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
What is difference between fileinputstream and filereader in java?
Does substring create a new object?
What is difference between arraylist and list in java?
What are the types of literals?
How do you sort in descending order in java using collections sort?
what are the disadvantages of indexes in oracle?
What are the restrictions imposed by a Security Manager on Applets?.
Is arraylist ordered?
Say any two properties in beans?
How do you square a number in java?
Can a class have multiple constructors?
Name and explain the types of ways which are used to pass arguments in any function in java.
List down the methods and interfaces of collection class in java.
Which method returns the length of a string?
Mention the default values of all the elements of an array defined as an instance variable.