Answer Posted / artavazd amirkhanyan
It's good question because of most of people can't explain why we can't have abstract final classes in Java. Most of them says "An abstract class is of no use if it cannot be extended or instantiated". Imagine class where we have 10 static methods and we want them to be final to never be overridden. Now, because of class have only static methods,we can make it abstract and because of restriction on overriding, we can make it final. So abstract final classes can be very useful in aforementioned cases. But we can't have abstract final classes in Java just stupidly because of Java do not let us. And this is one of many silly restrictions of Java.
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What loop means?
explain multi-threading in java?
What is an escape character in java?
How do you achieve polymorphism in java?
What does exclamation mean in java?
How do you remove an element from an arraylist in java?
What do you mean by formatting?
Explain about fail safe iterators in java?
Can we create our own wrapper class in java?
how to open and edit XML file in Weblogic???
What are the types of exceptions?
What do you mean by Function Overloading in java?
What is the difference between the direct buffer and non-direct buffer in java?
What is yield () in java?
What is a arraylist in java?