Hi people, I recently learn about 'Saving objects'. In order to practice it a little bit, I started making a problem. However I got stuck by a strange syntax error.
It says that I do not have the right amount of braces. But I do have the right amount of braces. Please help me out, And give me the correction. I will be pasting the code here:
import java.io.*;
public class network implements Serializable { /* <-- one of the error is here */
try{
tuna t=new tuna();
FileOutputStream file = new FileOutputStream("pass.ser");
ObjectOutputStream os = new ObjectOutputStream(file);
os.writeObject(t);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}//Another of the error is here
Please help me out.
Thanks in advance