Verifique se é curto int ou longo 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