Unit is a subtype ofscala.AnyVal. There is only one value of typeUnit,(), and it is not represented by any object in the underlying runtime system. A method with return typeUnit is analogous to a Java method which is declaredvoid.
Unit
()
void