can we inherit final method in java
class Demo{
public final void demoMethod(){
System.out.println("Hello");
}
}
public class Sample extends Demo{
public final void demoMethod(){
System.out.println("demo method");
}
public static void main(String args[]){
Sample obj = new Sample();
obj.demoMethod();
}
}