Android examples for java.lang:Class
get Class Name for object
public class Main{ public static String getClassName(Object obj) { String arrays[] = obj.getClass().getName().split("\\."); return arrays[arrays.length - 1]; }//from w ww . ja va 2 s . co m }