I am trying to complete a little program.
I\'ve got a text file (.txt) to store different data on objects that i\'ve got.
The structure of the file is the next (
LineNumberReader lnr = new LineNumberReader(new FileReader(new File("File1")));
lnr.skip(Long.MAX_VALUE);
long length = lnr.getLineNumber();
lnr.close();
in = new BufferedReader(new FileReader( "data.txt" ));
Car[] cars= new Car[length/5];
String currentLine;
int i=0;
for(int i=0;i
You'll have to handle exceptions too, surround stuff in try catch
structures.