Saturday, 7 September 2013

How to check if the input is an integer?

How to check if the input is an integer?

I am taking input as integer using Scanner class. in.nextInt(); I need to
prompt "wrong input" if user has entered any floating point number or
character or string. How can i accomplish this ?

No comments:

Post a Comment