Hi all,
please look at following code
The code above compiles and runs successfully. The question is why the reference variable t1 allow a call to the equals() method? Every class in
java extends Object by default, but an interface does not extend Object, because an interface can only extend another interface but not class. The interface anInterface does not define the method equals() but a call to this method is still possible. can anyone tell me how it works?
kind regards
Serg