Clazz
📌 Clazz 객체 얻기
public class Test {
public static void main(String[] args) {
Test test = new Test();
Class clazz = Test.class;
System.out.println(clazz.getName());
} // main
} // end class
public class Test {
public static void main(String[] args) {
Test test = new Test();
Class clazz = test.getClass();
System.out.println(clazz.getName());
} // main
} // end class
public class Test {
public static void main(String[] args) throws ClassNotFoundException {
String FQCN = Test.class.getName();
Class clazz = Class.forName(FQCN);
System.out.println(clazz.getName());
} // main
} // end class