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
Can we convert list to set in java?
List primitive java types?
How do you use parseint in java?
What does math floor () do?
Explain about doubly linked list
What are the benefits of immutable objects?
What is synchronization and why is it important in java programming?
State some situations where exceptions may arise in java?
What are the 7 types of characters?
What are anonymous inner classes?
Can we use return in constructor?
What is an abstract method in java programming?
Are true and false keywords?
Define the term string pool?
What is the loop in java?