Saturday, October 27, 2018

abstract and final

As an abstract method has no implementation, and a final method has the 'final' implementation, a method cannot be marked both abstract and final.

Get Superclass


getSuperclass()

Class c = p.getClass();
while((c = objectReference.getSuperclass())!=null){
    System.out.println(c.getSimpleName());
}