Programming - Streams and Files
You Are Here :: Home > JAVA > Streams and Files - General Questions
19. |
_________________ and ____________________ classes come under byte oriented classes.
|
A. |
FileInputStream and FileOutputStream |
B.
|
FileReader and FileWriter |
C.
|
FileInputStream and FileWriter
|
D.
|
FileReader and FileOutputStream
|
|
Answer: Option A
Explanation:
FileInputStream and FileOutputStream classes come under byte oriented classes. |
|
20. |
_________________ and ____________________ come under character oriented classes.
|
A. |
FileInputStream and FileOutputStream |
B.
|
FileReader and FileWriter |
C.
|
FileInputStream and FileWriter
|
D.
|
FileReader and FileOutputStream
|
|
Answer: Option B
Explanation:
FileReader and FileWriter come under character oriented classes. |
|
21. |
Object of ___________________________ class contains address of the file from which we need to read the data.
|
A. |
FileInputStream |
B.
|
FileReader and FileWriter |
C.
|
FileInputStream and FileWriter
|
D.
|
FileReader and FileOutputStream
|
|
Answer: Option A
Explanation:
Object of FileInputStream class contains address of the file from which we need to read the data. |
|
22. |
Object of ___________________________ class contains address of the file from which we need to write the data.
|
A. |
FileInputStream |
B.
|
FileReader and FileWriter |
C.
|
FileInputStream and FileWriter
|
D.
|
FileOutputStream
|
|
Answer: Option D
Explanation:
Object of FileOutputStream class contains address of the file from which we need to write the data. |
|
23. |
Constructor of ___________________________ class is defined to accept name of the file as the argument.
|
A. |
FileInputStream |
B.
|
FileReader and FileWriter |
C.
|
FileInputStream and FileWriter
|
D.
|
FileOutputStream
|
|
Answer: Option A
Explanation:
Constructor of FileInputStream class is defined to accept name of the file as the argument. |
|
24. |
ASCII value of end of file character is ______________________
|
|
Answer: Option C
Explanation:
ASCII value of end of file character is -1. |
|
« prev
next »