I came across this question: via /r/learnprogramming


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?

Source: http://ift.tt/1gI0t6q

Submitted July 11, 2017 at 10:45PM by limbwal
via reddit http://ift.tt/2sO0nkz

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s