What Will Be The Output Of The Following Java Program Note #480
What will be the output of the following Java program? (Note: inputoutput.java is stored in the disk.)</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>
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Exploring Java Lang Java IO - Java.io Byte Streams - Quiz No.1.
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()); } }
true
false
prints number of bytes in file
prints number of characters in the file