import java.io.*;
public class MyProgram
{
public static void main(String args[])
{
FileOutputStream out = null;
try
{
out = new FileOutputStream(test.txt);
out.write(122);
}
catch(IOException io)
{
System.out.println(IO Error.);
}
finally
{
out.close();
}
}
}
import java.io.*;
public class MyProgram
{
public static void main(String args[])
{
FileOutputStream out = null;
try
{
out = new FileOutputStream(test.txt);
out.write(122);
}
catch(IOException io)
{
System.out.println(IO Error.);
}
finally
{
out.close();
}
}
}
Given that all methods of class FileOutputStream, including close(), throw an IOException, which of the following is true?
Reveal answer
Fill a bubble to check yourself