java.lang.Number has following subclasses:
BigDecimal, BigInteger, Byte, Double, Float, Integer, Long, Short
I am exploring datatypes and I am confused when to use Short and when to use Integer. It appears to me that both can save same values.
|
Code:
|
Short s = 22;
Integer i = 23; |
Thanks in advance.