how you will prevent inheritance is there any other way
other than inheritance?
Answer Posted / raju
One way to prevent inhertance is final class
2) Using private Constructor in a class we can prevent
inhertance[Single ton class ]
Alternate of in hertance are
delegation,composition, aggrigration etc..
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Which container method is used to cause a container to be laid out and redisplayed in java programming?
Explain jvm, jre, and jdk?
What is meant by oops concept in java?
Implement two stacks using a single array.
Is singleton class thread safe?
What is main string [] args?
Give any two differences between C++ and java.
how to create constants in java?
What data type is true or false?
How are multiple inheritances done in Java?
What is a ternary operator in java? What is an interface?
What are methods and how are they defined?
What is difference between classpath and path variables in java?
why an outer class cannot be declared as private?
How will you reverse a singly-link list?