What is instance of an integer?

As the name suggests, instanceof means an instance (object) of a class . Primitive datatypes are not instances. This is how you get the class for a primitive datatype: int i = 1; System.out.println(((Object)i).getClass().getName()); // prints: java.lang.Integer.1 Eyl 2019

Read more