4 Replies Latest reply: Nov 21, 2006 11:41 AM by 807607 RSS

    how can i get the name of the class that a particular string belongs to

      "exp" is an arraylist in a method "preform" under the class "Profitable".
      The contents of Arraylist "exp" are from many classes.
      now i want to know whether the arraylist "exp " is from a particular class "Armour".

      i Tried with the following code. But i did,nt get the class name. But i got the type of class(like java.lang.String).

      for(int i=0; i<exp.size(); i++)
      String temp = exp.get(1).getClass();
      but this returns only the type of class(java.lang.String) but not the class name from where it is mapped.

      kindly suggest me with suitable code