Java MCQs with answers Page - 19

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. Byte Stream Classes support input/output operations on _____

  • (A) 8 bit
  • (B) 16 bit
  • (C) 32 bit
  • (D) 64 bit

A

Admin • 831.35K Points
Coach

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

A

Admin • 831.35K Points
Coach

Q. How do you position a component using FlowLayout?

  • (A) North, South, East, West
  • (B) Assign a row/column grid reference
  • (C) Pass a X/Y percentage parameter to the add method
  • (D) Do nothing, the FlowLayout will position the component

A

Admin • 831.35K Points
Coach

Q. How do you change the current layout manager for a container

  • (A) Use the setLayout() method
  • (B) Once created you cannot change the current layout manager of a component
  • (C) Use the setLayoutManager() method
  • (D) Use the updateLayout() method

A

Admin • 831.35K Points
Coach

Q. The AWT component used to display a single line of read-only text

  • (A) A checkbox
  • (B) A Label
  • (C) A button
  • (D) A TextField

A

Admin • 831.35K Points
Coach

Q. The method to get the text of a Label

  • (A) getLabel()
  • (B) getText()
  • (C) getString()
  • (D) getData()

A

Admin • 831.35K Points
Coach

Q. The AWT component used for taking input from user.

  • (A) A TextBox
  • (B) A Label
  • (C) A button
  • (D) A TextField

A

Admin • 831.35K Points
Coach

Q. The method to set the text of Textfield.

  • (A) setLabel()
  • (B) setString()
  • (C) setText()
  • (D) setData()

A

Admin • 831.35K Points
Coach

Q. The class used to create a Radio button in awt is

  • (A) Checkbox
  • (B) RadioButton
  • (C) OptionButton
  • (D) CheckboxGroup

A

Admin • 831.35K Points
Coach

Q. A ------------ is an object that the user can see on the screen and-in most cases-interact with.

  • (A) an Event
  • (B) a window
  • (C) a Component
  • (D) a Listener

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