Import java.io.*;
class Happy {
public static void main(
String args[]) {
try {
File f = new File(Test.txt);
OutputStream o=new FileOutputStream(f);
}
catch(IOException e) { }
}
}
What happens when this code compiles and run?
a) Compilation error.
b) The code compiles and runs successfully but no file is created.
c) A file with zero length is created.
d) The code compiles but there will be a RuntimeException because there
is no matching constructor for the FileInputStream.
[This message has been edited by Hades Pan (edited December 06, 2001).]