Say I have the following java code:
Object myObj = new ArrayList();
List myList = new ArrayList();
I would like to know how to determine which class or interface a given object is typed with.
Note that I am not talking of the type the object was instanciated from (here ArrayList) but rather the type on the left-hand side of the expression so that would be in the example above Object for myObj and List for myList.
How do I call this "left-hand side" type in proper parlance?
Also, how do I call the "right-hand side" type?
How do I determine programmatically what is this "left-hand side" type?
Regards,