I don't understand how the following works:

class RTTI {
X x = new X();
Class clObj;

clObj=x.getClass();
System.out.printlin("x is object of type:" + clObj.getName());
{

output : x is object of type: X

I don't understand how the output would be of class X when the class of clObj is Class.

I am new at this, so please take it easy on me.

thanks,
jonnyhall