Programming - Streams and Files
You Are Here :: Home > JAVA > Streams and Files - General Questions
13.
We can create object of output stream class with the help of an anonymous ____________________ class
A.
inner
B.
outer
C.
Reader Class
D.
Writer Class
Answer: Option A
Explanation:
we can create object of output stream class with the help of an anonymous inner class.
14.
why we use system.out?
A.
because 'out' is a static variable in system class
B.
because 'out' is a final variable in system class
C.
because 'out' is a non-static variable in system class
D.
because 'out' is a global variable in system class
Answer: Option A
Explanation:
because 'out' is a static variable in system class and we know static members are accesses using the name of the class,when we access them from outside the class.
15.
___________________ method is used to read data in bytes.
A.
read()
B.
write()
C.
readLine()
D.
writeLine()
Answer: Option A
Explanation:
read() method is used to read data in bytes.
16.
___________________ method is used to read data as Strings.
A.
read()
B.
write()
C.
readLine()
D.
writeLine()
Answer: Option C
Explanation:
readLine() method is used to read data as Strings.
17.
The ____________________ method is defined in both the byte oriented classes as well as character oriented classes.
A.
read()
B.
write()
C.
readLine()
D.
writeLine()
Answer: Option C
Explanation:
readLine() method is used to read data as Strings.readLine() method is defined in both the byte oriented classes as well as character oriented classes.
18.
Whenever we need to store data permanently then we use the concept of ___________________.
A.
Files
B.
streams
C.
packages
D.
folders
Answer: Option A
Explanation:
Whenever we need to store data permanently then we use the concept of Files.
« prev
next »