Usage in android: private static final String TAG = DemoApplication.class.getSimpleName(); public class sample{ public static void main(String[] args){ //得到类的简写名称 System.out.println(sample.class.getSimpleName()); //得到对象的全路径 System.out.println(sample.