Sprawdź, czy krótka INT lub długa Java

if(x == (short)x)System.out.println("* short");
if(x == (int)x)System.out.println("* int");
if(x == (long)x)System.out.println("* long");
Jealous Jay