It also contains Void.TYPE, useful for testing return type with reflection:
Say you want to have a generic that returns void for something:
abstract class Foo<T>
{
abstract T bar();
}
class Bar
extends Foo<Void>
{
Void bar()
{
return (null);
}
}
What is the need of Void class in Java [duplicate]
https://stackoverflow.com/questions/2352447/what-is-the-need-of-void-class-in-java