2014-03-04 08:22:43 UTC
E1 E2 E3
2497 12500 2
3323 13000 5
4521 18210 4
6789 8000 2
5476 6000 1
4423 16400 3
6587 25000 4
3221 10500 4
5555 15000 2
1085 19700 3
3097 20000 8
4480 23400 5
2065 19700 2
8901 13000 3
My current code so far:
import java.io.*;
import java.util.*;
public class Prog110
{
public static void main(String[] args)throws IOException
{
Scanner kbReader = new Scanner(new File("C:\\Users\\Guest\\Documents\\Java Programs\\Prog110\\Prog110.in"));
while(kbReader.hasNextLine())
{
String line = kbReader.nextLine();
String[] e1 = line.substring(0,4);
}
}
}
So I stopped there because it returned an incompatible types error, and now I'm unsure of what I can do to fix this, or if the way I'm storing the data into the arrays is correct. I was hoping that some could show me how I could properly store the data of E1, E2, and E3 into three separate arrays(each column is separated by a space). All help is greatly appreciated