0
What is a short
not sure how this data type is different
2 ответов
+ 16
as @ Dev already explained for comparison or more :
https://www.tutorialspoint.com/java/java_basic_datatypes.htm
+ 11
Referring from the Java Oracle documentation:
The short data type is a 16-bit signed two's complement integer. It has a minimum value of -32,768 and a maximum value of 32,767 (inclusive). As with byte, the same guidelines apply: you can use a short to save memory in large arrays, in situations where the memory savings actually matters.