Java MCQs with answers Page - 14

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 of these methods is a part of Abstract Window Toolkit (AWT) ?

  • (A) display()
  • (B) paint()
  • (C) drawString()
  • (D) tr

A

Admin • 831.35K Points
Coach

Q. Which of these operators can be used to get run time information about an object?

  • (A) getInfo
  • (B) Info
  • (C) instanceof
  • (D) getinfoof

A

Admin • 831.35K Points
Coach

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

  • (A) print()
  • (B) println()
  • (C) write()
  • (D) all of the mentioned

A

Admin • 831.35K Points
Coach

Q. Which of these class is used to read from a file?

  • (A) InputStream
  • (B) BufferedInputStream
  • (C) FileInputStream
  • (D) BufferedFileInputStream

A

Admin • 831.35K Points
Coach

Q. Which of these events is generated by scroll bar?

  • (A) ActionEvent
  • (B) KeyEvent
  • (C) WindowEvent
  • (D) AdjustmentEvent

A

Admin • 831.35K Points
Coach

Q. Which of these methods can be used to obtain the command name for invoking ActionEvent object?

  • (A) getCommand()
  • (B) getActionCommand()
  • (C) getActionEvent()
  • (D) getActionEventCommand()

A

Admin • 831.35K Points
Coach

Q. Which of these class is not related to input and output stream in terms of functioning?

  • (A) File
  • (B) Writer
  • (C) InputStream
  • (D) Reader

A

Admin • 831.35K Points
Coach

Q. Which of these class is not a member class of java.io package?

  • (A) String
  • (B) StringReader
  • (C) Writer
  • (D) File

A

Admin • 831.35K Points
Coach

Q. Which of these class is a superclass of all other classes?

  • (A) Math
  • (B) Process
  • (C) System
  • (D) Object

A

Admin • 831.35K Points
Coach

Q. Which of these classes is used for input and output operation when working with bytes?

  • (A) InputStream
  • (B) Reader
  • (C) Writer
  • (D) All of the mentioned

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