Is there any method or quick way to check whether a number is an Integer (belongs to Z field) in Java?
I thought of maybe subtracting it from the rounded number, but
// in C language.. but the algo is same
#include int main(){ float x = 77.6; if(x-(int) x>0) printf("True! it is float."); else printf("False! not float."); return 0; }