It's very difficult to ascertain what you're trying to do. You said in the OP
 Quote by squelchy451
I wanted to make a program that would check if a number if it was an integer or not in Java.
|
yet the name of your class is gcd, which suggests you want to find the greatest common divisor.
What are you trying to do? If you want to check that a double is actually an integer, you can use the floor() function to find the largest integer that is less than or equal to your number. IOW, val - floor(val) should evaluate to 0.0 if val is an integer.
thread title is