• Post Reply Bookmark Topic Watch Topic
  • New Topic

HELP!!!!!  RSS feed

 
Dmitri Mayer
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once the string is received from the user, you need to check each character of that string to see if any of them is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Then, if it is, you need to throw an appropriate exception. How can I check that is a number???
[ January 05, 2005: Message edited by: Dmitri Mayer ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
look up the String api for a method that converts the string to a character array,
then look up the Character api for a method that will do exactly what you want (in a loop of the character array)
 
Dmitri Mayer
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very very much
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!