java how to see if a number is already in an integer code example Example: how to check if number is integer in java if(x == (int)x){ println("x is an integer"); }