九州编程
public abstract class Test {public static void main(String arg[]) {A a = new A();A a1 = new A();B b = new B();Class aa = a.getClass();Class aa1 = a1.getClass();Class bb = b.getClass();System.out.println(aa.equals(bb)); // falseSystem.out.println(aa.equals(aa1)); // trueSystem.out.println(aa == bb); // falseSystem.out.println(aa == aa1); // true}static class A {}static class B {}}