Results 1 to 2 of 2
- 08-12-2009, 10:17 AM #1
Member
- Join Date
- Mar 2009
- Location
- London
- Posts
- 8
- Rep Power
- 0
NumberFormatException: empty String
an any one help me why this error comes?
the file format is :-
12.00 40.00
13.00 41.00
i actual read each line and split and i need each value to comapre with some other values.
error:-
java.lang.NumberFormatException: empty String
at sun.misc.FloatingDecimal.readJavaFormatString(Floa tingDecimal.java:994)
at java.lang.Double.parseDouble(Double.java:510)
at Test2Darray.loadData(Test2Darray.java:56)
at Test2Darray.main(Test2Darray.java:256)
Java Code:String strLine1; int p = 0; strLine1 = br1.readLine(); while (strLine1 != null) { String[] starwords1 = strLine1.split("[ \\ ]+"); for (int q = 0; q < starwords1.length; q++) { year2007[p][q] = Double.parseDouble(starwords1[q]); } p++; strLine1 = br1.readLine(); }
- 08-12-2009, 10:46 AM #2
Similar Threads
-
NumberFormatException
By Manfizy in forum New To JavaReplies: 13Last Post: 07-09-2009, 11:59 AM -
NumberFormatException raised
By venkatallu in forum New To JavaReplies: 1Last Post: 06-02-2009, 09:27 PM -
XML JDOM XPATH NumberFormatException
By Jazzperson in forum Advanced JavaReplies: 3Last Post: 03-08-2009, 08:15 PM -
NumberFormatException problem
By bluebarca in forum New To JavaReplies: 1Last Post: 02-06-2009, 07:39 AM -
Error: NumberFormatException
By coco in forum New To JavaReplies: 1Last Post: 08-07-2007, 07:41 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks