Algorithms & Data Structures

Identifying the Various Java Primitive Types

ALGOR-GOCTKD

Primitive data types represent the most basic unit of data storage in a programming language. Each primitive type is used to store a single, simple value. These pieces of data can then be manipulated directly using arithmetic, comparison, and logical operators.

Fill in the blanks below to match each Java primitive type to its corresponding description. Each option is used only once.

The

type is used to store very large numerical values. It uses 64 bits and can store both positive and negative integers.

The

type is used to store numerical values with a decimal component. It is the smaller of the two primitive types used to store these kinds of values.

The

type is used to store small positive numerical values. It can also be used to store individual Unicode characters.

The

type is used to store one of two possible values: true or false.

The

type uses the fewest bits of all the numerical primitives. It uses only 8 bits to store values in a range from $-128$ to $127$.

The

type is used to store a 32-bit numerical value. Primitive types exist that use half as many and twice as many bits to store significantly smaller or larger values, respectively.

The

type is used to store large numerical values with a decimal component. It uses twice as many bits as the other primitive type used for this kind of values.

The

type is used to store values in a range from ${-2}^{15}$ to ${2}^{15}-1$.