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
Is integer passed by reference in java?
Why is a constant variable important?
What is an image buffer?
What is javac used for?
Is singleton class thread safe?
Define an abstract class with reference to java.
Explain the importance of finally block in java?
Does java vector allow null?
Is null in java?
What is a pattern what is an anti pattern?
How do you pass by reference?
What is the differences between heap and stack memory in java? Explain
What is functional interface in java?
How to sort array in descending order in java?
What is the maximum size of a string in java?