Builder
is a static nested class of Hello
, therefore it should be able to access private
constructor Sample$Hello(int)
.
However, JVM doesn't have any special support for nested classes, therefore, from the JVM point of view, Builder
cannot access Sample$Hello(int)
.
In order to solve this problem compiler generates synthetic constructor Sample$Hello(int,Sample$1)
with default visibility, and calls it instead of Sample$Hello(int)
from Builder
.
Sample$1
is an empty class generated by the compiler to make distinguished signature for Sample$Hello(int,Sample$1)
. Actually, the second argument of this constructor is always null
.