mercredi 30 octobre 2019

Printing the object reference instead of class name in Java

Why does System.out.println(ClassName.class) prints the class name instead of object's memory reference? Where ClassName.class also retrun the object reference of Class class object.





Aucun commentaire:

Enregistrer un commentaire