What is the use if “instanceof” keyword ?
instanceof” keyword is used to check what is the type of object. F The instanceof keyword in Java is used to test whether an object is an instance of a particular class, interface, or subclass. It is a binary operator that returns a boolean value – true if the object is an instance of the specified type, and false otherwise. Here’s a basic example: java public class Example { public static void main(String[] args) { String str = “Hello, World!”;//…