How to check whether input value is integer or float?
Suppose 312/100=3.12 Here i need check whether 3.12 is a float value or integer value, i.e., without any decimal
How about this. using the modulo operator
if(a%b==0) { System.out.println("b is a factor of a. i.e. the result of a/b is going to be an integer"); } else { System.out.println("b is NOT a factor of a"); }