The output for above code will be
In the above example, we have created an object name of the String type and another object age of the Integer type. We then used the instanceof operator to check whether the name is of the String type and age is of the Integer type.