How would you stop a class from class from being derived or
inherited.

Answer Posted / bala

Final will do in Java. But not in C++.

I hope, bye creating all the constructor,copy constructor
in private will stop inherite the class.
Plz refer 'Singleton Pattern'

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is static modifier?

636


What does and I oop mean?

620


How do you achieve runtime polymorphism?

573


write a program that takes input in digits and display the result in words from 1 to 1000

1994


What does oop mean in snapchat?

688






What are the benefits of polymorphism?

627


Which is better struts or spring?

624


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2039


Which is not an object oriented programming language?

544


What is the advantage of oop over procedural language?

630


Whats is abstraction in oops?

593


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1944


Why is static class not inherited?

601


Write a program to sort the number with different sorts in one program ??

1923


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1656