The code in this chapter uses the features defined in pattern matching (JEP 305) that haven't been targeted for any JDK release version yet. To experiment with the code, you can clone the relevant repository.
All code in this chapter can be accessed at https://github.com/PacktPublishing/Java-11-and-12-New-Features.
Let's cover the issues with using instanceof and explicit type-casting operators.