MCQs > IT & Programming > Java MCQs > Java I/O Package MCQs

Java I/O Package MCQ

Breaking a string or stream into meaningful independent words is known as tokenization.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

SequenceInputStream class is used to read data from?

Answer

Correct Answer: Multiple streams

Note: This Question is unanswered, help us to find answer for this one

These four methods are commonly used in?

public char[] readPassword(String fmt,Object... args)

public String readLine()

public String readLine(String fmt,Object... args)

public char[] readPassword(

Answer

Correct Answer: Console class

Note: This Question is unanswered, help us to find answer for this one

The java.io.StreamTokenizer.nextToken() method parses the next token from the?

Answer

Correct Answer: Input stream of this tokenizer

Note: This Question is unanswered, help us to find answer for this one

Which class breaks the input into tokens using a delimiter which is whitespace bydefault, It provides many methods to read and parse various primitive values?

Answer

Correct Answer: Scanner Class

Note: This Question is unanswered, help us to find answer for this one

These commonly used methods of:

1) public abstract int read()throws IOException

2) public int available()throws IOException

3) public void close()throws IOException

Answer

Correct Answer: InputStream class

Note: This Question is unanswered, help us to find answer for this one

Which method of DataInputStream class reads a line from the file and returns it as a string?

Answer

Correct Answer: ReadLine()

Note: This Question is unanswered, help us to find answer for this one

Which class is used to uncompress the file in the deflate compression format, It provides facility to the other uncompression filters?

Answer

Correct Answer: InflaterInputStream class

Note: This Question is unanswered, help us to find answer for this one

Which are the ways to read data from the keyboard?

Answer

Correct Answer: All

Note: This Question is unanswered, help us to find answer for this one

Which is used to converts the byte-oriented stream into character-oriented stream?

Answer

Correct Answer: InputStreamReader

Note: This Question is unanswered, help us to find answer for this one

Which class can be used to read data line by line by readLine() method?

Answer

Correct Answer: BufferedReader

Note: This Question is unanswered, help us to find answer for this one

The stream tokenizer class can recognize identifiers, numbers, quoted strings, and various comment styles?

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

The PipedInputStream and PipedOutputStream classes can be used to read and write data simultaneously?

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

A stream is a sequence of data.In Java a stream is composed of?

Answer

Correct Answer: Bytes

Note: This Question is unanswered, help us to find answer for this one

The PrintStream class provides methods to?

Answer

Correct Answer: Write data to another stream

Note: This Question is unanswered, help us to find answer for this one