short

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


\begin{lstlisting}
class ShortExample {
public static void main(String[] args) ...
...re;
temperature = -200;
System.out.println(temperature);
}
}
\end{lstlisting}