Hi,
I've got a Java object with me.
I'm able to find the name of the class of which it is an instance, the attributes of that object etc., using the reflect package.
But how is it that I find the actual name of that object.
Calling getClass() on the object will return a Class object. From that Class object you can call getName() which returns a String object representing the name of the Class.
eg.
Note that this sets objectType to the fully qualified name of the entity. eg. If your object was of type Object objectType would be set to "Ljava.lang.Object"
hope that helped MYenigmaSELF:-9
myenigmaself@yahoo.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.