Nullable type
Feature of some programming languages / From Wikipedia, the free encyclopedia
Dear Wikiwand AI, let's keep it short by simply answering these key questions:
Can you list the top facts and stats about Nullable type?
Summarize this article for a 10 year old
Nullable types are a feature of some programming languages which allow a value to be set to the special value NULL instead of the usual possible values of the data type. In statically typed languages, a nullable type is an option type[citation needed], while in dynamically typed languages (where values have types, but variables do not), equivalent behavior is provided by having a single null value.
This article needs additional citations for verification. (March 2009) |
NULL is frequently used to represent a missing value or invalid value, such as from a function that failed to return or a missing field in a database, as in NULL in SQL. In other words NULL is undefined.
Primitive types such as integers and Booleans cannot generally be null, but the corresponding nullable types (nullable integer and nullable Boolean, respectively) can also assume the NULL value.[jargon][citation needed] This can be represented in ternary logic as FALSE,NULL,TRUE as in three-valued logic.