Java 16 – Pattern matching for instanceof

We all have used instanceof check with a subsequent cast to the desired type and in this process, we are doing two operations: validating whether the object we have is of the desired type using instanceof when the validation is true then we cast the object to the desired type and proceed with the operations. … Read more

%d bloggers like this: