I would just use
int a = Integer.parseInt(thirdLine.substring(0, indexOf(" ")));
tempString = thirdLine.subString(indexOf(" "), thirdLine.length());
int b = Integer.parseInt(tempString.subString(0, indexOf(" ")));
and so on...


1 2 3 | String inLine = "0 5 0 3 0 0" ; int [] nums = new int [ 6 ]; for ( int i = 0 ; i < 6 ; i++) nums[i] = Integer.valueOf( "" + inLine.charAt(i * 2 )); |
1 | for ( int i = 0 ; i < 6 ; i++) set[i] = Integer.valueOf( "" + lines.charAt(i * 2 )); |
1 | for ( int i = 0 ; i < 6 ; i++) set[i] = Integer.valueOf( "" + lines.charAt(i )); //<-- use i instead of i*2 |