|
-
May 24th, 2011, 05:48 PM
#7
Re: From String array to int array throwing ','and null from text file
i should delete line 69 that cause the error otherwise it wont print any thing
this the code after deleting the error line (t will not change == remain 0)
for (int j = 0; j < linecount; j++){
s[j] = br.readLine();
}
for (int j = 0; j < linecount; j++){
d=s[j].toCharArray();
System.out.println(s[j]);
for (int y=0 ; y<=d.length ; y++){
System.out.println(y);
}
}
System.out.println("==========");
System.out.println(linecount);
FF.close();
}
}
OUTPUT
Enter a filepath to copy from, and one to copy to.
C:\Users\F.A.M\Desktop\GGGGGGGGG\tr.txt
0
5
0
1
1,10
0
1
2
3
4
8,10
0
1
2
3
4
10,8
0
1
2
3
4
7,4
0
1
2
3
3,1
0
1
2
3
0,1,10
0
1
2
3
4
5
6
1,2,5
0
1
2
3
4
5
2,3,25
0
1
2
3
4
5
6
0,3,3
0
1
2
3
4
5
3,4,8
0
1
2
3
4
5
==========
12
BUILD SUCCESSFUL (total time: 12 seconds)
THANK FOR BEING SO PATIENT WITH ME NORM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|