Reading null and void as the same kind of “nothing” confuses a missing value with a function that returns no value. A literal writes a value directly in code; variables and constants give values names under different rules. When reading a declaration or call result, separate the value, its name, and its type.
Key terms
A literal writes a value directly; a variable gives a value a name. A constant restricts reassignment under a language's rules. null concerns an absent value or reference, while void commonly describes a function that returns no value.
| Term | Meaning |
|---|---|
initial value / initialized value | A value supplied when something is first initialized; “initialized value” may also mean the value after initialization. Check the context. |
default value | A value supplied when none is specified, according to the API or language rule. |
original value | The value before a change. |
current value | The value at the point being observed. |
return value / returned value | The value produced by a function or method call. |
Terms to distinguish
| Term | Meaning |
|---|---|
variable / var | A named storage location or binding used to hold or refer to a value. var can abbreviate “variable” or be a declaration keyword in some languages. |
literal | A value written directly in source code. In int x = 10;, 10 is an integer literal; in String str = "abc";, "abc" is a string literal. |
constant / const | A value or name defined to resist change, with the exact guarantee depending on the language and its const rules. A constant binding does not always make an object deeply immutable. |
primitive data type | A language-defined basic type, such as an integer or floating-point type. Which types count as primitive depends on the language. |
null / nil | Language-specific representations of an absent value or object reference. Their type, comparison rules, and permitted uses differ by language. |
Terms in code
| Term | Meaning |
|---|---|
void | In many languages, a return-type notation for a function that does not return a value. Its exact meaning varies by language; it is not the same concept as a null reference. |
static variable | A variable associated with a particular program or type scope rather than each ordinary call or instance. Its sharing, scope, and lifetime depend on the language. |
local variable | A variable available within its declaring local scope, often a function or block. Scope and lifetime depend on the language and runtime. |
Reading a technical document
If you treat
nullandvoidas interchangeable, you may miss whether a value is absent or a function has no returned value.
When several unfamiliar terms appear together, identify the subject and action first. Then ask whether each remaining term names a value, a binding, a type, or a scope.
Key takeaways
Distinguish a value, a name for a value, and an absent value.
- initial value / initialized value — A value at initialization; read the precise usage in context.
- literal — A value written directly in source code, such as
10or"abc". - local variable — A binding available in its declaring local scope, subject to language-specific lifetime rules.

