What Will Be The Output Of The Following Java Programp Pre #955
What will be the output of the following Java program?</p> <pre><code class="language-java" line="1"> import java.io.*; class filesinputoutput { public static void main(String args[]) { InputStream obj = new FileInputStream("inputoutput.java"); System.out.print(obj.available()); } }</code></pre> <p>Note: inputoutput.java is stored in the disk.
This multiple choice question (MCQ) is related to the book/course
gs gs128 Java.
It can also be found in
gs gs128 Java IO Applets - Reading & Writing Files in Java - Quiz No.1.
What will be the output of the following Java program?
import java.io.*; class filesinputoutput { public static void main(String args[]) { InputStream obj = new FileInputStream("inputoutput.java"); System.out.print(obj.available()); } } Note: inputoutput.java is stored in the disk.
true
false
prints number of bytes in file
prints number of characters in the file