advantages of short data type

what are the advantages of short over there any?
It's usually smaller than int, which can make a difference if you have millions of instances of a class.
It's usually smaller than int

Basically I think that also depends on the implementation. But when it's true the above advantage occur.

The relative sizes are something like: short <= int <= long but short and long cannot be equal. Something like that.

Basically have into mind that the difference is the maximum number they can represent. Usually you chooce the smaller that is satisfactory if there is not any other reason (e.g. future needs for bigger number etc) and does make a difference for storage or speed but you can ignore it at a lot of cases and focus on other issues.
Topic archived. No new replies allowed.