Menu

Objective Type Questions & Answers


Java Programming Objective Type Questions-Part-5



1. Give the abbreviation of AWT?

A . Applet Windowing Toolkit

B . Abstract Windowing Toolkit

C . Absolute Windowing Toolkit

D . None of the above

Answer



2. Which is the container that contain title bar and can have MenuBars. It can have other components like button, textfield etc.?

A . Panel

B . Frame

C . Window

D . Container

Answer



3. Which is a component in AWT that can contain another components like buttons, textfields, labels etc.?

A . Window

B . Container

C . Panel

D . Frame

Answer



4. The following specifies the advantages of -> It is lightweight. -> It supports pluggable look and feel. -> It follows MVC (Model View Controller) architecture.

A . Swing

B . AWT

C . Both A & B

D . None of the above

Answer



5. Which class provides many methods for graphics programming?

A . java.awt

B . java.Graphics

C . java.awt.Graphics

D . None of the above

Answer



6. The Following steps are required to perform 1) Implement the Listener interface and overrides its methods.  2) Register the component with the Listener

A . Exception Handling

B . String Handling

C . Event Handling

D . None of the above

Answer



7. In which places can put the event handling code

A . Same class

B . Other class

C . Annonymous class

D . All mentioned above

Answer



8. Which package provides many event classes and Listener interfaces for event handling?

A . java.awt

B . java.awt.Graphics

C . java.awt.event

D . None of the above

Answer



9. To use the ActionListener interface it must be implemented by a class there are several ways to do that find in the following?

A . Creating a new class

B . using the class the graphical component

C . an anonymous inner class

D . All mentioned above

Answer



10. The ActionListener interface is used for handling action events,For example,it`s used by a

A . JButton

B . JCheckbox

C . JMenuItem

D . All of these

Answer



11. Which is the container that doesn`t contain title bar and MenuBars but it can have other components like button, textfield etc?

A . Window

B . Frame

C . Panel

D . Container

Answer



12. Which method is used to set the graphics current color to the specified color in the graphics class?

A . public abstract void setFont(Font font)

B . public abstract void setColor(Color

C . public abstract void drawString(String str, int x, int y)

D . None of the above

Answer



13. In Graphics class which method is used to draws a rectangle with the specified width and height?

A . public void drawRect(int x, int y, int width, int height)

B . public abstract void fillRect(int x, int y, int width, int height)

C . public abstract void drawLine(int x1, int y1, int x2, int y2)

D . public abstract void drawOval(int x, int y, int width, int height)

Answer



14. Which object can be constructed to show any number of choices in the visible window?

A . Labels

B . Choice

C . List

D . Checkbox

Answer



15. Which is used to store data and partial results, as well as to perform dynamic linking, return values for methods, and dispatch exceptions?

A . Window

B . Panel

C . Frame

D . Container

Answer



16. Which class is used for this Processing Method processActionEvent( )?

A . Button,List,MenuItem

B . Button,Checkbox,Choice

C . Scrollbar,Component,Button

D . None of the above

Answer



17. Which method can set or change the text in a Label?

A . setText()

B . getText()

C . All the above

D . None of the above

Answer



18. Which is a component in AWT that can contain another components like buttons, textfields, labels etc.?

A . Window

B . Container

C . Panel

D . Frame

Answer



19. Which are passive controls that do not support any interaction with the user?

A . Choice

B . List

C . Labels

D . Checkbox

Answer



20. Which package provides many event classes and Listener interfaces for event handling?

A . java.awt

B . java.awt.Graphics

C . java.awt.event

D . None of the above

Answer



21. Where can the event handling code be written?

A . Same class

B . Other class

C . Anonymous class

D . All mentioned above

Answer





Relevant Materials :

Java Programming Objective Type Question Bank - [ Java Programming ]

Java Programming Objective Type Questions-Part-1 - [ Java Programming ]

Java Programming Objective Type Questions-Part-2 - [ Java Programming ]

Java Programming Objective Type Questions-Part-3 - [ Java Programming ]

Java Programming Objective Type Questions-Part-4 - [ Java Programming ]

Java Programming Objective Type Questions-Part-5 - [ Java Programming ]


Similar Materials :

R - Programming MCQs - Unit-1 - [ R-Programming ]

R - Programming MCQs - Unit-2 - [ R-Programming ]

R - Programming MCQs - Unit-3 - [ R-Programming ]

R - Programming MCQs - Unit-4 - [ R-Programming ]

R - Programming MCQs - Unit-5 - [ R-Programming ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-1 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-2 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-3 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-4 - [ FLAT ]

Formal Languages and Automata Theory (FLAT) MCQs - Unit-5 - [ FLAT ]

PPS MCQs - Unit-1 - [ PPS ]

PPS MCQs - Unit-2 - [ PPS ]

PPS MCQs - Unit-3 - [ PPS ]

PPS MCQs - Unit-4 - [ PPS ]

PPS MCQs - Unit-5 - [ PPS ]

Object Oriented Programming through Java MCQs - Unit-1 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-2 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-3 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-4 - [ OOP_JAVA ]

Object Oriented Programming through Java MCQs - Unit-5 - [ OOP_JAVA ]

Design and Analysis of Algorithms MCQs - Unit-1 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-2 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-3 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-4 - [ DAA ]

Design and Analysis of Algorithms MCQs - Unit-5 - [ DAA ]

Software Engineering MCQs - Unit-1 - [ SE ]

Software Engineering MCQs - Unit-2 - [ SE ]

Software Engineering MCQs - Unit-3 - [ SE ]

Software Engineering MCQs - Unit-4 - [ SE ]

Software Engineering MCQs - Unit-5 - [ SE ]

Data Mining MCQs - Unit-1 - [ DM ]

Data Mining MCQs - Unit-2 - [ DM ]

Data Mining MCQs - Unit-3 - [ DM ]

Data Mining MCQs - Unit-4 - [ DM ]

Data Mining MCQs - Unit-5 - [ DM ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-1 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-2 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-3 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-4 - [ COA ]

Computer Organization and Architecture (COA) Objective Question Bank-Unit-5 - [ COA ]

Data Structures Objective Type Question Bank-Unit-1 - [ DS ]

Data Structures Objective Type Question Bank-Unit-2 - [ DS ]

Data Structures Objective Type Question Bank-Unit-3 - [ DS ]

Data Structures Objective Type Question Bank-Unit-4 - [ DS ]

Data Structures Objective Type Question Bank-Unit-5 - [ DS ]

Database Management System Objective Type Question Bank-Unit-1 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-2 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-3 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-4 - [ DBMS ]

Database Management System Objective Type Question Bank-Unit-5 - [ DBMS ]