I really do mean identity-equality here.
For example, will the following always print true?
System.out.println(\"foo\".getClass() ==
For two instances of class X,
X
x1.getClass() == x2.getClass()
only if
x1.getClass().getClassLoader() == x2.getClass().getClassLoader()
Note: Class.getClassLoader() may return null which implies the bootstrap ClassLoader.
Class.getClassLoader()