

MCQOPTIONS
Saved Bookmarks
This section includes 19 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
Which among the following is a serialization descriptor for any class? |
A. | StreamClass |
B. | ObjectStreamClass |
C. | ObjectStream |
D. | StreamObjectClass |
Answer» C. ObjectStream | |
2. |
RandomAccessFile can be used to _______________________ |
A. | Read from a random access file |
B. | Write to a random access file |
C. | Read and write to a random access file |
D. | Restricts read and write to a random access file |
Answer» D. Restricts read and write to a random access file | |
3. |
Which exception handler can be used when character encoding is not supported? |
A. | UnsupportedException |
B. | UnsupportedEncodingException |
C. | SupportException |
D. | EncodingException |
Answer» C. SupportException | |
4. |
StringReader handles _____________________ |
A. | Any character stream |
B. | A character stream whose source is an array |
C. | A character stream whose source is character array |
D. | A character stream whose source is String only |
Answer» E. | |
5. |
Which class can handle IO class interrupt? |
A. | ExceptionIO |
B. | InteruptedIO |
C. | InteruptedIOException |
D. | IOInteruptException |
Answer» D. IOInteruptException | |
6. |
Reader class is _________________ |
A. | Used to read from files |
B. | Abstract class to read character streams |
C. | Abstract class to input character streams |
D. | Used to take input from standard input stream |
Answer» C. Abstract class to input character streams | |
7. |
Which class among the following makes incorrect assumptions? |
A. | LineNumberInputStream |
B. | LineNumberReader |
C. | LineReader |
D. | LineBuffer |
Answer» B. LineNumberReader | |
8. |
What does FilePermission class do? |
A. | This class is used to give permission rights to a file |
B. | This class is used to restrict the use of permissions |
C. | This class is used to represent device access permissions |
D. | This class is used to represent file access permissions |
Answer» E. | |
9. |
FileInputStream _________________________ |
A. | Gets the input stream from any device file |
B. | Gets the input stream from any open socket |
C. | Gets the input stream from any cache |
D. | Gets the input stream from any open file only |
Answer» E. | |
10. |
What is a FileDescriptor? |
A. | A handle for machine specific structure of an open file |
B. | A handle for program specific structure of an open file |
C. | A handle for compiler specific structure of an open file |
D. | A handle for representing device files structure |
Answer» B. A handle for program specific structure of an open file | |
11. |
File class is ____________________________ |
A. | An abstract of file representation only |
B. | An abstract of path names only |
C. | An abstract which can be used to represent path names or file |
D. | An abstract which can represent a file in any format |
Answer» D. An abstract which can represent a file in any format | |
12. |
Which among the following class contains the methods to access character based console device? |
A. | Console |
B. | File |
C. | Device |
D. | Pipe |
Answer» B. File | |
13. |
IO class provides input and output through ______________________ |
A. | Data streams |
B. | Serialization |
C. | File system |
D. | Data streams, serialization and file system |
Answer» E. | |
14. |
What is the use of IO class? |
A. | To handle all the input operations |
B. | To handle all the output operations |
C. | To handle all the input and output operations |
D. | To handle all the input and output to the standard input |
Answer» D. To handle all the input and output to the standard input | |
15. |
WHICH_CLASS_CAN_HANDLE_IO_CLASS_INTERRUPT??$ |
A. | ExceptionIO |
B. | InteruptedIO |
C. | InteruptedIOException |
D. | IOInteruptException |
Answer» D. IOInteruptException | |
16. |
Which exception handler can be used when character encoding is not supported?$ |
A. | UnsupportedException |
B. | UnsupportedEncodingException |
C. | SupportException |
D. | EncodingException |
Answer» C. SupportException | |
17. |
StringReader handles _____________________$ |
A. | Any character stream |
B. | A character stream whose source is an array |
C. | A character stream whose source is character array |
D. | A character stream whose source is String only |
Answer» E. | |
18. |
PushBackReader allows the streams to be pushed back to the stream. |
A. | True |
B. | False |
Answer» B. False | |
19. |
Reader class is ________________? |
A. | Used to read from files |
B. | Abstract class to read character streams |
C. | Abstract class to input character streams |
D. | Used to take input from standard input stream |
Answer» C. Abstract class to input character streams | |