File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception Question

 
George Han
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there an Excetion that means that it is not String? kinda like NumberFormatException?
 
Rick O'Shay
Ranch Hand
Posts: 531
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, NumberFormatException means the string's not a number. Anything can have a string representation so it's not clear what you mean. You can have an empty string or a null string or a non-string in terms of a class other than string. Certainly there is NullPointerException (I guess Java does have pointers) and ClassCastException and IllegalArgumentException (of which NumberFormatException is a family member) but that's about it.
 
Kudret Serin
Ranch Hand
Posts: 167
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why do you need this Exception?
 
George Han
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my code


Im tryign to loop it but I need to fix a problem When I press 3 after the first time and 3 again it doenst loop correctly.
 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Number Format Exception will Mostly occur when you try to convert a string to a integer and if cant convert it to int the Exception will occur.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic