Comments

 
User Comments for the tutorial:

Java example to get Object class name at runtime



Advertisement

Comments

getClass.getName()
Public class A { } Public class B extends A { public static void main String args[]) { A a = new B(); System.out.println(a.getClass().getName()); } } whats the output 

Related Tutorial and Articles