getName
getClass()方法----getName()方法
public class Test { public static void main(String[] args) { Person p = new Person(1,"刘德华"); System.out.println(p.getClass()); System.out.println(p.ge ......
Java 获取当前或调用者类名和方法名(Thread.currentThread().getStackTrace()、new Throwable().getStackTrace()) this.getClass().getName();
Java 获取当前或调用者类名和方法名(Thread.currentThread().getStackTrace()、new Throwable().getStackTrace()) 原文链接:https://blog.csdn.net/inthat/article/details/11188554 ......