Back to Browse

Java 14 new features | Pattern matching for instance of operator in JDK 14

446 views
Sep 26, 2020
3:50

This video explains you with real time example, how you can write a java code using instanceof operator and with using pattern matching for instanceof operator. And also explains the problem/redundent with old approach. Java 14 new features | Pattern matching for instance of operator in JDK 14 Use pattern matching for instanceof operator to simplify the use of the instanceof operator in Java, thereby making your code safer and more easier to write. Many Java developers use the instanceof operator to compare a reference variable to a type. If the result is true, the next obvious step is to explicitly type cast it to the type they compared it with, to access its members. These steps have a repetition: compareTo. This step is redundent. this step can be avoided when you start using the pattern matching for instnce of operator in java 14 #JavaBeam #Java14NewFeatures #InstanceOfOperatorInJava14 #Java

Download

1 formats

Video Formats

360pmp45.3 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Java 14 new features | Pattern matching for instance of operator in JDK 14 | NatokHD