About Question enthuware.ocpjp.v21.2.3721 :
Moderators: Site Manager, fjwalraven
-
- Posts: 2
- Joined: Sat Oct 26, 2024 6:11 am
- Contact:
About Question enthuware.ocpjp.v21.2.3721 :
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.
-
- Site Admin
- Posts: 10382
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v21.2.3721 :
You are right. This restriction was removed in Java 21. This has now been fixed.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 9 guests