instanceof keyword in java

The ” instanceof ” keyword is used to check whether an object is an instance of a particular class or interface The instanceof in java is also known as type comparison operator because it compares the object or instance with type.It returns either true or false. Example Object score = new Integer(98); if (score instanceof […]

Share this article on