Java.io in Java MCQs

@T-Bone

This question paper focuses on the "Java.io" of the Java programming. These Multiple Choice Questions (mcq) should be practiced to improve the Java programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

This question paper focuses on the "Java.io" of the Java programming. These Multiple Choice Questions (mcq) should be practiced to improve the Java programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

Questions

1. Java I/O is used to process the?

Mark the correct option

2. Can we perform file handling in Java by Java I/O API?

Mark the correct option

3. In java, how many streams are created for us automatically?

Mark the correct option

4. Which method is used to write a byte to the current output stream?

Mark the correct option

5. Which method is used to write an array of byte to the current output stream?

Mark the correct option

6. Which of these class is not a member class of java.io package?

Mark the correct option

7. ObjectFilter is a member of java.io package.

Mark the correct option

8. ___________ returns true if called on a file and returns false when called on a directory.

Mark the correct option

9. What will be output for the following code? import java.io.*; class files { public static void main(String args[]) { File obj = new File(""/java/system""); System.out.print(obj.getName()); } }

Mark the correct option

10. What will be output for the following code? Note: file is made in c drive import java.io.*; class files { public static void main(String args[]) { File obj = new File(""/java/system""); System.out.print(obj.canWrite()); System.out.print("" "" + obj.canRead()); } }

Mark the correct option

Index of Questions