Top 250+ Solved Java Programming MCQ Questions Answer

From 196 to 210 of 285

Q. Which of these methods is used to begin the execution of a thread?

a. run()

b. start()

c. runThread()

d. startThread()

  • b. start()

Q. Which of these method waits for the thread to treminate?

a. sleep()

b. isAlive()

c. join()

d. stop()

  • c. join()

Q. Which of these is used to read a string from the input stream?

a. get()

b. getLine()

c. read()

d. readLine()

  • d. readLine()

Q. Which of these classes is used to read characters and strings in Java from console?

a. BufferedReader

b. StringReader

c. BufferedStreamReader

d. InputStreamReader

  • d. InputStreamReader

Q. Which of these classes are used by Byte streams for input operation?

a. InputStream

b. InputOutputStream

c. Reader

d. All of the mentioned

  • a. InputStream

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

a. System

b. System.out

c. BufferedOutputStream

d. PrintStream

  • d. PrintStream

Q. Which of these methods can be used to write console output?

a. printout()

b. println()

c. write()

d. All of the mentioned

  • b. println()

Q. Which of these classes are used by character streams output operations?

a. OutputStream

b. Writer

c. ReadStream

d. InputOutputStream

  • b. Writer

Q. Which refers to a channel through which data flow from the source to the destination:

a. String

b. Character

c. Stream

d. Buffer

  • c. Stream

Q. Java Stream classes can be categorized into two groups:

a. Byte and Character Stream Classes

b. Stream and String Classes

c. String and Character Stream Classes

d. Buffer and Character Stream Classes

  • a. Byte and Character Stream Classes

Q. Byte Stream Classes support input/output operations on _____

a. 8 bit

b. 16 bit

c. 32 bit

d. 64 bit

  • a. 8 bit

Q. Character Stream Classes support input/output operations on _______ characters:

a. 8 bit Unicode

b. 16 bit Unicode

c. 32 bit Unicode

d. 64 bit Unicode

  • b. 16 bit Unicode

Q. The ________ method help in clearing the contents of the buffer:

a. flush()

b. clear()

c. rub()

d. vanish()

  • a. flush()

Q. The _______ class is used to write bytes to a file:

a. FileInputStream

b. FileOutputStream

c. FileBufferStream

d. FileStringStream

  • b. FileOutputStream
Subscribe Now

Get All Updates & News