Nullary constructor
Appearance
A nullary constructor is a constructor that takes no arguments.
Example
public class Example { // nullary constructor public Example() { this.data = 1; } // non-nullary constructor public Example(int data) { this.data = data; } protected int data; }
Example
-- nullary type constructor with two nullary data constructors data Bool = False | True -- non-nullary type constructor with non-nullary data constructor data Point a = Point a a