how you will prevent inheritance is there any other way
other than inheritance?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / marx
If you declare the class as a final,we cant inherit the
class.
Is This Answer Correct ? | 5 Yes | 3 No |
What is the default value of an object reference declared as an instance variable?
What happens if we override private method?
How core java/j2ee project performance can be measured ?
What are java packages? What's the significance of packages?
What is package protected in java?
How many static init can you have?
What does g mean in regex?
How Applets & Servlets will communicate with each other?
what is the difference between Object Based Language and Object Oriented Language?
what is unreachable code problem in multiple catch statements
Is minecraft java edition free?
What is variable explain?