Results 1 to 4 of 4
- 01-07-2011, 04:26 PM #1
Member
- Join Date
- Dec 2010
- Posts
- 8
- Rep Power
- 0
- 01-07-2011, 04:38 PM #2
Post an SSCCE that demonstrates what you're talking about and we might be able to help (notice how that only has one 'p').
But chances are, "" does not format to a number and therefore the Exception is thrown.
Also notice how sentences begin with a capital letter and end with a punctuation mark of some kind.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 01-07-2011, 11:50 PM #3
Senior Member
- Join Date
- Dec 2010
- Posts
- 165
- Rep Power
- 3
most likely you are using Integer.parseInt() or Double.parseDouble() or (anything else similar) to directly parse your input and when you enter "", it throws error. You can either catch the error using try/catch , or you can check for "" string first before passing your input to these methods.
- 01-08-2011, 01:10 AM #4
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,604
- Rep Power
- 5
Similar Threads
-
Exception in thread "main" java.lang.NumberFormatException: Value out of range. Value
By jav2000x in forum New To JavaReplies: 5Last Post: 04-12-2010, 03:39 PM -
jsp insert into database error(java.lang.NumberFormatException: For input string: "")
By cypher_girl in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 12-22-2009, 03:14 AM -
Runtime error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
By shantimudigonda in forum New To JavaReplies: 1Last Post: 11-20-2009, 07:58 PM -
[newbie] Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException:
By jon80 in forum New To JavaReplies: 3Last Post: 06-07-2009, 12:14 AM -
How can I prevent "found void but expected java.lang.String" ?
By trueblue in forum New To JavaReplies: 3Last Post: 05-21-2009, 03:48 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks