can anyone help me this im just trying to read some integers into a linked list from a textfile the file will be something like this, ive done the code but it wont compile

Arrival Times      Burst times
23                      .5454
34                      .78
12                      .96

Code:

import java.util.LinkedList;
import java.util.ListIterator;
import java.io.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.FileReader;


public class OSAssign
{


public static void main(String [] args) throws IOException
{
LinkedList processes = new LinkedList();
ListIterator itr = processes.listIterator();
FileReader fileReader = new FileReader(filename);
BufferedReader bufferedReader = new BufferedReader(fileReader);
String inputString = bufferedReader.readLine();
while (inputString != null)
{
try
{
int entry = Integer.parseInt(inputString);
processes.add(new Integer(entry));
itr.next();
}
catch (NumberFormatException e)
{
System.err.println("Not an integer");
}
inputString = bufferedReader.readLine();
}
LinkedList.printList(processes);
}
}

Hi everyone,
What are errors that the compiler show. Post them here for us to see
and try not throw exceptions in the main as sometimes this causes the program to crash

Richard West

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.