Home Tutorialhelp Allcomments Java Java Get Example Get Object Class Name

 
 

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
Advertisements Advertisements
 

 

 

DMCA.com