Testing for inheritance in Java and in Delphi:

Java Delphi
if (o instanceof T1) if o is T1 then