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 HashTable?
Where is java located?
why is multiple inheritance not allowed in java?
7 Answers Elementus Technologies, Huawei, Infosys,
What is the main use of java?
Is boolean a wrapper class in java?
Explain listiterator and methods in listiterator?
Can a main method be declared final?
What will happen if static modifier is removed from the signature of the main method?
Which is easier netbeans or eclipse?
How do you read and print a string in java?
How to overcome the exception object reference not set to an instance of object?
what is meta-Inf?