posted 19 years ago
the first if statement is false, as al is an object of class D, which is not an instance of C. The part after && is not evaluated
the second if statment is false, the first part gives a value of first, but since & is used, the second part of the if condition is evaluated, which means a3 is an object of class C
the third if is true, as the first part (before |) is true, but the second part is also evaluated (a2 = new D()) again because it is a single |.
the fourth if is false, as a2 is not an instance of C (from third if construct), and class D does noot extend C
Sok