-
What is the output of this program?
import java.io.*;
public class InputStream_Example
{
public static void main(String args[]) throws IOException
{
InputStream obj = new FileInputStream("Interviewmania.com");
System.out.print(obj.available());
}
}
-
- Compilation Error
- Runtime Error
- true
- false
- None of these
Correct Option: B
Exception in thread "main" java.io.FileNotFoundException: Interviewmania.com (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.(FileInputStream.java:138)
at java.io.FileInputStream.(FileInputStream.java:93)
at InputStream_Example.main(InputStream_Example.java:6)