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 |
Describe string intern() methodology
What is dynamic dispatch in java?
Why lambda expression is used in java?
What are serialization and deserialization?
What is the difference between the size and capacity of a vector?
How does predicate work in java?
What is the purpose of the runtime class in java programming?
What are abstract methods in java?
Which arithmetic operations can result in the throwing of an arithmeticexception?
Where will it be used?
How does linkedhashmap work in java?
What is a functional interface?