911 B
911 B
| title | chunk | source | category | tags | date_saved | instance |
|---|---|---|---|---|---|---|
| Nullary constructor | 1/1 | https://en.wikipedia.org/wiki/Nullary_constructor | reference | science, encyclopedia | 2026-05-05T11:36:45.009411+00:00 | kb-cron |
In computer programming, a nullary constructor is a constructor that takes no arguments. Also known as a 0-argument constructor, no-argument constructor, parameterless constructor or default constructor.
== Object-oriented constructors == In object-oriented programming, a constructor is code that is run when an object is created. Default constructors of objects are usually nullary.
=== Java example ===
=== C++ example ===
== Algebraic data types == In algebraic data types, a constructor is one of many tags that wrap data. If a constructor does not take any data arguments, it is nullary.
=== Haskell example ===
== See also == Default constructor
== References ==