byte

The $\lstinline{byte}$ data type can have values from $-128$ to $127$ (8-bit signed two's complement integer). It's used instead of $\lstinline{int}$ or other integer data types to save memory if it's certain that the value of a variable will be within $[-128, 127]$. Default value is 0.


\begin{lstlisting}
class ByteExample {
public static void main(String[] args) {
\par
byte range;
range = 124;
System.out.println(range);
}
}
\end{lstlisting}