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 is the constructor?
Explain java coding standards for methods?
What is the difference between import java.util.date and java .util?
What is pre increment and post increment in java?
Is java same as core java?
What is the purpose of the finally clause of a try-catch-finally statement in java programming?
What are the benefits of operations in java?
Write a program based on Java script program.
What is java objectoutputstream?
What are the legal parameters?
what is the purpose of the runtime class?
What makes a function well defined?
Why is inheritance used in java?
Can we convert stringbuffer to string?
Explain the difference between serializable and externalizable in java?