-
getClass and getName
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|