How do you find out what type an object is in Java?

You can check object type in Java by using the instanceof keyword . Determining object type is important if you’re processing a collection such as an array that contains more than one type of object. For example, you might have an array with string and integer representations of numbers.

Leave a Reply

Your email address will not be published. Required fields are marked *