wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Streams

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which of these class is used to read characters and strings in Java from console?

a)

StringReader

b)

BufferedReader

c)

InputStreamReader

d)

BufferedStreamReader

2.

Which of these stream contains the classes which can work on character stream?

a)

InputStream

b)

OutputStream

c)

Character Stream

d)

All of the mentioned

3.

Which of these method of FileReader class is used to read characters from a file?

a)

read()

b)

scanf()

c)

get()

d)

getInteger()

4.

Which of these is a type of stream in Java?

a)

Integer stream

b)

Byte Stream

c)

Short Stream

d)

Long Stream

5.

Which of these classes are used by character streams for input and output operations?

a)

InputStream

b)

InputOutputStream

c)

ReadStream

d)

Writer

6.

Which package contains a large number of stream classes that provide capabilities for processing all types of data?

a)

java.awt

b)

java.io

c)

java.util

d)

java.net

7.

Which of the following method(s) not included in InputStream class?

a)

available( )

b)

reset( )

c)

flush( )

d)

close( )

8.

Which of these class contains the methods print() & println()?

a)

System

b)

System.out

c)

BUfferedOutputStream

d)

PrintStream

9.

Which of these methods can be used to writing console output?

a)

print()

b)

println()

c)

write()

d)

All of the mentioned

10.

Which exception is thrown by read() method?

a)

IOException

b)

InterruptedException

c)

SystemException

d)

SystemInputException