1. |
Which of these packages contain classes and interfaces used for input & output operations of a program?
|
||||||||
Answer:
Option (c) |
2. |
Which of these class is not a member class of java.io package?
|
||||||||
Answer:
Option (a) |
3. |
Which of these interface is not a member of java.io package?
|
||||||||
Answer:
Option (c) |
4. |
Which of these class is not related to input and output stream in terms of functioning?
|
||||||||
Answer:
Option (a) |
5. |
Which of these is specified by a File object?
|
||||||||
Answer:
Option (c) |
6. |
Which of these is method for testing whether the specified element is a file or a directory?
|
||||||||
Answer:
Option (b) |
7. |
What will be the output of the following Java code?
import java.io.*; class files { public static void main(String args[]) { File obj = new File("/java/system"); System.out.print(obj.getName()); } }
|
||||||||
Answer:
Option (b) |
8. |
What will be the output of the following Java program? (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.getAbsolutePath()); } }
|
||||||||
Answer:
Option (d) |
9. |
What will be the output of the following Java program? (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.getParent()); System.out.print(" " + obj.isFile()); } }
|
||||||||
Answer:
Option (c) |
10. |
Which of these classes is used for input and output operation when working with bytes?
|
||||||||
Answer:
Option (a) |