I came across this question:
Determine if a string is a double or an integer.. I'm assuming it has to be one of them. Anyway, my first thought was to do Integer.parseInt(str), and catch an error, would this not be what an interviewer be looking for?
Submitted July 11, 2017 at 10:45PM by limbwal
via reddit http://ift.tt/2sO0nkz