Explore topic-wise MCQs in Java (MCQ) questions and answers.

This section includes 3 Mcqs, each offering curated multiple-choice questions to sharpen your Java (MCQ) questions and answers knowledge and support exam preparation. Choose a topic below to get started.

1.

The Following steps are required to perform1) Implement the Listener interface and overrides its methods2) Register the component with the Listener

A. Exception Handling
B. String Handling
C. Event Handling
D. None of the above
Answer» D. None of the above
2.

The followinga) It is lightweight.b) It supports pluggable look and feel.c) It follows MVC (Model View Controller) architectureare the advantages of _____ .

A. Swing
B. AWT
C. Both A & B
D. None of the above
Answer» B. AWT
3.

Where are the following four methods commonly used?1) public void add(Component c)2) public void setSize(int width,int height)3) public void setLayout(LayoutManager m)4) public void setVisible(boolean)

A. Graphics class
B. Component class
C. Both A & B
D. None of the above
Answer» C. Both A & B