If you do not want your class to be inherited by any other class. What would you do?
Answer Posted / Girijesh Singh
To prevent a class from being inherited, you can declare it as final using the 'final' keyword.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is java string pool?
What is the difference between equals() and == in java?
Explain public static void main(string args[]) in java.
What is an object in java and how is it created?
What is the difference between break and continue statements?
explain different ways of using thread? : Java thread
Realized?
What are the differences between heap and stack memory in java?
How to create a base64 decoder in java8?
Differentiate between static and non-static methods in java.
What is a classloader in java?
Is minecraft 1.15 out?
How to sort array in descending order in java?
What do you mean by an interface in java?
Write a program to print count of empty strings in java 8?