Computer Science, asked by ankursharma291297, 3 months ago

The file Text.txt when opened with the Notepad text editor, it shows the content as shown
below.
X
Text,but - Notepad
File Edit Format View Help
NPTEL
Consider the following program.
import java.io.*
public class Test{
public static void main(String[] args) {
try{
InputStream file = new FileInputStream("/Text.txt");
System.out.print(file available();
}
catch(Exception e) {
System out.print(e);
3
Which of the following is the correct output for the 'try portion of the code?
a. Prints the number of bytes in the file.
b. Prints the number of characters in the file.
c. Prints 'true', if the file is present; else prints 'false'.
d. Prints nothing, as an exception will be caught.​

Answers

Answered by rakshit9847
0

Answer:

a prints the number of bytes in the file......

Similar questions