The only equalsmethod known to the class AAis Object equalsthat which takes an argument Object. Therefore, when you call a4.equals(a2)or a2.equals(b1)you can only call public boolean equals(Object ob), since the type of compilation time is both equal a2and a4equal AA.
, , "method1", Object equals. public boolean equals(AA ob) public boolean equals(BB ob) , BB, , . b1.equals(), , , .