Introduction
In this lab, you will learn how to check if an object is an instance of a specific class or interface in Java using the instanceof
keyword. We will explore its basic usage, test its behavior with subclasses, and understand how it handles null objects.
Through hands-on examples, you will gain practical experience in using instanceof
to perform runtime type checking, a fundamental concept in object-oriented programming.