In Java does anyone use short or byte?

前端 未结 11 890
挽巷
挽巷 2020-12-14 15:44

Apart from using (byte[]) in streaming I don\'t really see byte and short used much. On the other hand I have seen long used where the actual value is |100| and byte would b

11条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 16:00

    short and others are often used for storing image data. Note that it is the number of bits which is really important, not the arithmetic properties (which just cause promotion to int or better.

    short is also used as array indexes in JavaCard (1.0 and 2.0, IIRC, but not 3.0 which also has an HTTP stack and web services).

提交回复
热议问题