No, as for an abstract method we have to provide implementation in subclass. To do this abstract method have to be overridden but final methods cannot be overridden.
Example
abstract class Show{ //abstract final method declaration abstract final void show(); } public class Main extends Show { public static void main(String[] args) { System.out.println("Hello World"); } } |
Output
Main.java:10: error: illegal combination of modifiers: abstract and final abstract final void show(); ^ Main.java:12: error: Main is not abstract and does not override abstract method show() in Show public class Main extends Show ^ 2 errors |
Java interview questions on access modifiers
- what are access modifiers in java?
- What are different types of access modifiers in java?
- What are non access modifiers in java?
- Can we use abstract and final both with a method?
- Can abstract class have final methods in java?
- Can we declare a class as private in java?
- Can we declare an abstract method as private?
- Can we declare a class as protected in java?