Suppose you have an object called
thing,but you are not sure what type it is, and you would like to have your program print out that type. The
Objectclass (and therefore any class!) has another method,
getClass,that returns a special object of type
Classthat contains information about the class of the object calling the
getClassmethod. The
Classclass has a method called
getNamewhich returns the name of the class described by its calling object. Write a statement that prints the name of
thing’sclass.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.