title: Java. getClass() returns a class, how come I can get a string too?
body: <p>When I use <code>System.out.println(obj.getClass())</code> it doesn't give me any error. From what I understand <code>getClass()</code> returns a Class type. 
  Since <code>println()</code> will print only strings, how come instead of a class, <code>println</code> is getting a String?</p>