It is clear that I can't write the Test object to the file Test.dat, my question is what exactly is the reason that it will not succeed?
import java.io.*;
public class Test {
private int a = 10;
private double b = 7.5;
private String m = "valu";
public static void main(String[] args) {
Test t = new Test();
ObjectOutputStream output = ObjectOutputStream(new FileOutputStream("Test.dat"));
output.writeObject(t);
output.close();
}
}