primitive type

A basic built-in type, such as a whole number or true-or-false, whose values are held directly rather than as objects.

In more detail

Primitive values are cheap to store and copy. They usually cannot represent absence, which makes them a good choice when a value must always exist.

Examples

Java has eight: byte, short, int, long, float, double, boolean and char; collections need their wrapper classes, such as Integer.
int count = 12;
long total = 9000000000L;

Related terms

Taught in

References

Certification courses