import java.io.*;
import java.util.*;
public class array {
public static void main(String[] args) throws IOException {
FileInputStream in = null;
FileOutputStream out = null;
try {
in = new FileInputStream("input.txt");
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String line = null;
while ((line = reader.readLine()) != null) {
String split[]=line.split(",");
}
}
catch (IOException x) {
System.err.println(x);
} finally {
if (in != null) in.close();
}}}
I'm stuck at how to convert string in split into int. My input.txt :
a,b,c
2,2,1
1,1,1
2,2,1
3,3,1
4,4,1
5,5,1
1,6,2
2,7,2
3,8,2
4,9,2
5,10,2
Anyone can help?