Bookmark Topic Watch Topic
  • New Topic

how do i make sure that user does not enter a str for an int type  RSS feed

 
Tersa
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Report post to moderator
please look at subject. thanks
 
Rocky Summers
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Report post to moderator
do the try-catch block:

i'm not sure if it's NumberFormatException or some other Exception. anyways it's in java.sun.com
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
Tersa,
Welcome to JavaRanch!
We ain't got many rules 'round these parts, but we do got one. Please change your display name to comply with The JavaRanch Naming Policy.
Thanks Pardner! Hope to see you 'round the Ranch!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Report post to moderator
Arg! This is a duplicate post.
I'm closing this thread.
Please continue the conversation in the "check a if a string is present in an integer type" thread.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!