What will happen when you attempt to compile and run the following code?
import java.io.*;
public class ObSave{
public static void main(String argv[]) throws IOException{
ObSave o = new ObSave();
o.go();
}
public void go() throws IOException{
String[] obs = {"one","two","three"};
FileOutputStream out = new FileOutputStream("mystrings.ob");
ObjectOutputStream s = new ObjectOutputStream(out);
s.writeObject(obs);
s.flush();
}
}
|