Java is a fully object-oriented language. That means that everything, even primitive types (like int or double) has a class object in the JDK. Some examples include Integer
vs. int
, Boolean
vs. bool
and so forth. And, since every object in Java inherits from the class Object
, these enable you to use boxing and unboxing (explicitly casting a class instance as an Object instance) with every type, including primitive types.
Void
is simply a placeholder for the void
keyword in Java. It is an uninstantiable object which has no methods or properties. And since Void
's full name is java.lang.Void
, you can create a class object or even a method with the same name in your own namespace, as long as you haven't explicitly imported java.lang.Void
into your class file.