Answers for "java pattern matching 16"

0

java pattern matching 16

//Before Pattern Matching
if (obj instanceof String) {
  String str = (String) obj;
  System.out.println(str);
}
 
//After Pattern Matching
if (obj instanceof String str) {
  System.out.println(str);
}
Posted by: Guest on May-26-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language