Sobes.tech
Junior — Middle

What is the minimum and maximum range of values that variables of type short can take in a programming language?

sobes.tech AI

Answer from AI

In Java, the data type short occupies 16 bits and is a signed integer. The minimum value that can be stored in a short variable is -32768, and the maximum is 32767.

Example:

short minValue = -32768;
short maxValue = 32767;
What is the minimum and maximum range of values that… - sobes.tech