About Question enthuware.ocpjp.v21.2.3721 :
Posted: Sat Oct 26, 2024 6:15 am
I think also the first response is valid in Java 21 with the statement "if (a instanceof A a1) a1.a();" considering in Java 21 is possible to use the instance of also for the type of which the variable is created.