Anyone using short and byte primitive types, in real apps?

后端 未结 15 3023
遥遥无期
遥遥无期 2021-02-20 08:09

I have been programming in Java since 2004, mostly enterprise and web applications. But I have never used short or byte, other than a toy program just to know

15条回答
  •  青春惊慌失措
    2021-02-20 08:29

    It's perhaps more interesting to look at the semantics of int. Are those arbitrary limits and silent truncation what you want? For application-level code really wants arbitrary sized integers, it's just that Java has no way of expressing those reasonably.

提交回复
热议问题