Java MCQs with answers Page - 18

Here, you will find a collection of MCQ questions on Java. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 831.35K Points
Coach

Q. Which method in Thread class is used to check weather a thread is still running?

  • (A) isAlive()
  • (B) Join()
  • (C) isRunning()
  • (D) Alive()

A

Admin • 831.35K Points
Coach

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

  • (A) run()
  • (B) start()
  • (C) runThread()
  • (D) startThread()

A

Admin • 831.35K Points
Coach

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

  • (A) sleep()
  • (B) isAlive()
  • (C) join()
  • (D) stop()

A

Admin • 831.35K Points
Coach

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

  • (A) BufferedReader
  • (B) StringReader
  • (C) BufferedStreamReader
  • (D) InputStreamReader

A

Admin • 831.35K Points
Coach

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

Admin • 831.35K Points
Coach

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

  • (A) System
  • (B) System.out
  • (C) BufferedOutputStream
  • (D) PrintStream

A

Admin • 831.35K Points
Coach

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

  • (A) printout()
  • (B) println()
  • (C) write()
  • (D) All of the mentioned

A

Admin • 831.35K Points
Coach

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

  • (A) OutputStream
  • (B) Writer
  • (C) ReadStream
  • (D) InputOutputStream

A

Admin • 831.35K Points
Coach

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

  • (A) String
  • (B) Character
  • (C) Stream
  • (D) Buffer

A

Admin • 831.35K Points
Coach

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

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ