I need to check if a value is an integer. I found this: How to check whether input value is integer or float?, but if I’m not mistaken, the variable there is still of type double even though the value itself is indeed an integer.
I need to check if a value is an integer. I found this: How
Share
If input value can be in numeric form other than integer , check by
If string value is being passed , use
Integer.parseInt(string_var).Please ensure error handling using try catch in case conversion fails.