JAVA 11

COEP
Lets Crack Online Exam

IT Interview Exam Questions: JAVA 11 (IT Campus Placement)

Subject: JAVA 11

Part 11: List for questions and answers of JAVA

 

Q1. Package of drawstring() method is

a) java.applet

b) java.io

c) javax.swing

d) java.awt

 

Q2. Which method executes only once

a) start() method

b) init() method

c) stop() method

d) destroy() method

 

Q3. Give the abbreviation of AWT?

a) Applet Windowing Toolkit

b) Abstract Windowing Toolkit

c) Absolute Windowing Toolkit

d) None of the above

 

Q4. 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

 

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

a) Window

b) Container

c) Panel

d) Frame

 

Q6. 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 and B

d) None of the above 

 

Q7. Which class provides many methods for graphics programming?

a) java.awt

b) java.Graphics

c) java.awt.Graphics

d) None of the above

 

Q8. 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

 

Q9. 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

 

Q10. 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

 

Q11. The ActionListener interface is used for handling action events,For example,it’s used by

a) JButton

b) JCheckbox

c) JMenuItem

d) All of these

 

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

a) Window

b) Frame

c) Panel

d) Container 

 

Q13. How many types of controls does AWT supports these controls are subclasses of component?

a) 7

b) 6

c) 5

d) 8

 

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

a) Choice

b) List

c) Labels

d) Checkbox

 

Q15. Which class is used to create a pop-up list of items from which the user may choose?

a) List

b) Choice

c) Labels

d) Checkbox

 

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

a) Labels

b) Choice

c) List

d) Checkbox

 

Q17. Which of these packages contains all the classes and methods required for even handling in Java?

a) java.applet

b) java.awt

c) java.event

d) java.awt.event

 

Q18. What is an event in delegation event model used by Java programming language?

a) An event is an object that describes a state change in a source

b) An event is an object that describes a state change in processing

c) An event is an object that describes any change by the user and system

d) An event is a class used for defining object, to create events 

 

Q19. Which of these interface handle sequences?

a) Set

b) List

c) Comparator

d) Collection

 

Q20. Which of these is Basic interface that all other interface inherits?

a) Set

b) Array

c) List

d) Collection 

 

Part 11: List for questions and answers of JAVA

 

Q1. Answer: d

 

Q2. Answer: b

 

Q3. Answer: b

 

Q4. Answer: b

 

Q5. Answer: b

 

Q6. Answer: a

 

Q7. Answer: c

 

Q8. Answer: c

 

Q9. Answer: c

 

Q10. Answer: d

 

Q11. Answer: d

 

Q12. Answer: c

 

Q13. Answer: a

 

Q14. Answer: c

 

Q15. Answer: b

 

Q16. Answer: c

 

Q17. Answer: d

 

Q18. Answer: a

 

Q19. Answer: b

 

Q20. Answer: d