📜  检查是 short int 还是 long java 代码示例

📅  最后修改于: 2022-03-11 14:52:17.046000             🧑  作者: Mango

代码示例1
if(x == (short)x)System.out.println("* short");
if(x == (int)x)System.out.println("* int");
if(x == (long)x)System.out.println("* long");