V

Vijay Sangwan • 28.62K Points
Instructor II

Q. What will be the output of the following Java program? (Note: inputoutput.java is stored in the disk.)
import java.io.*;
class filesinputoutput
{
public static void main(String args[])
{
InputStream obj = new FileInputStream("inputoutput.java");
System.out.print(obj.available());
}
}

  • (A) true
  • (B) false
  • (C) prints number of bytes in file
  • (D) prints number of characters in the file
  • Correct Answer - Option(C)
  • Views: 54
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics