如何从该类中的静态方法获取类的名称。例如
public class MyClass {
public static String getClassName() {
String name = ????; // what goes here so the string "MyClass" is returned
return name;
}
}
为了把它放在上下文中,我实际上想要在异常中将类名作为消息的一部分返回。
繁星coding
慕姐4208626
随时随地看视频慕课网APP
相关分类