I have the following code which is a method that displays the content of a file with the name "File"
the error is: "unreachabl e statement" at the "F.close". what I'm supposed to do?
Code:
public void DisplayAll()throws IOException
{
try
{DataInputStream F = new DataInputStream(new FileInputStream("File"));
{
for(;;)
{
System.out.println(F.readUTF());
System.out.println(F.readInt());
System.out.println(F.readInt());
}
}
F.close();
}catch(EOFException eof){}
}
Comment