In API
“The Void class is an uninstantiable placeholder class to hold a
reference to the Class object representing the Java keyword void.”
- What is “uninstantiable” place holder class? When will
java.lang.Voidbe used? If the class is “uninstantiable”, what use is it? - What is difference between
java.lang.Voidandvoid?
The only point of
Voidis to holdVoid.TYPE, which is sort of likevoid.class. If you have a reflective reference to a method that returnsvoid, and you get its return type, it’ll returnVoid.TYPE.You cannot, and should not, use it for anything else.