Can you make an abstract class/method final in Java?
GIAN Tutorials
3:34 AM
No, you cannot make an abstract class or method final in Java because abstract and final are the mutual exclusive concept . An abstract class is incomplete and can only be instantiated by extending a concrete class and implementing all abstract methods, while a final class is considered as complete and cannot be extended further. This means when you make an abstract class final, it cannot be extended hence it cannot be used and that's why Java compiler throws a compile time error when you try to make an abstract class final in Java Can we make an Abstract method final in Java Now that, you know there is no way you can make an abstract class final in Java, let's try to make an abstract method final in Java. As I said above, this time also Java compiler should complain because both final and abstract are mutual exclusive keywords: abstract class ImAbstract{ public final abstract void anAbstractMethod (); } class ImConcrete extends ...