I have a set of 3 strings, each in different lines, which are integers separated by spaces.
1 1 2
3 4 4
4 5 5
I wanted to input them into a character array, and I used StringTokenizer in this manner:
for(int j=0;i<n1;i++){
s2=bure.readLine();
st1=new StringTokenizer(s2);
for(int k=0;k<n2;k++){
a[j][k]=Integer.parseInt(st1.nextToken());
}
}
Where n1 and n2 are the number of rows and columns.