public class ClassFields {
public static void main(String[] args) throws IOException {
Com1 com1 = new Com1();
System.out.println(com1.getClass().getName());
//test.Com1
Com2 com2 = new Com2();
System.out.println(com2.getClass().getSimpleName());
//Com2
}
}
加油,明天会更好~~~