Ajp (1) With Probable Answer
Ajp (1) With Probable Answer
o A) EventListenerInterface
o B) ActionListener
o C) ComponentListener
o D) EventHandlerInterface
o A) Event source
o B) Event listener
o C) Event object
o D) Event handler
o A) MouseEvent
o B) MouseListener
o C) KeyEvent
o D) ButtonEvent
o A) ActionEventListener
o B) ActionListener
o C) ButtonListener
o D) ComponentListener
o A) KeyEvent
o B) KeyboardListener
o C) ActionListener
o D) KeyPressListener
o A) ActionEvent
o B) MouseEvent
o C) ItemEvent
o D) WindowEvent
o A) Button press
o B) Text input
o D) Mouse click
o A) Mouse clicks
o A) ActionEvent
o B) WindowEvent
o C) KeyEvent
o D) MouseEvent
13. Which of the following is a type of event that the WindowListener interface
handles?
o A) WindowOpenedEvent
o B) MouseClickedEvent
o C) ActionPerformedEvent
o D) KeyTypedEvent
14. Which method is used to register an event listener for an ActionEvent in Java?
o A) addActionListener()
o B) registerListener()
o C) addListener()
o D) addEventListener()
o A) ActionEvent
o B) KeyEvent
o C) MouseEvent
o D) WindowEvent
o A) getKeyCode()
o B) getSource()
o C) getMousePosition()
o D) getItemState()
o A) MouseMotionEvent
o B) MouseListener
o C) MouseEvent
o D) MouseAdapter
20. Which event listener interface is used to handle changes in a checkbox state?
o A) ActionListener
o B) ItemListener
o C) MouseListener
o D) TextListener
21. Which Java class is used to retrieve the IP address of a given host name?
o A) InetAddress
o B) URLConnection
o C) Socket
o D) ServerSocket
o A) URL
o B) URLConnection
o C) InetAddress
o D) URLHandler
23. Which method in the URLConnection class is used to get input from a URL?
o A) getInputStream()
o B) getData()
o C) openStream()
o D) getOutputStream()
o A) bind()
o B) listen()
o C) connect()
o D) setPort()
26. Which of the following Java classes are used for network communication via
TCP/IP?
o A) Socket, ServerSocket
o B) DatagramSocket, DatagramPacket
o C) URL, URLConnection
o D) InetAddress, DatagramSocket
o A) DatagramSocket
o B) Socket
o C) ServerSocket
o D) ProxySocket
o A) TCP
o B) HTTP
o C) UDP
o D) FTP
31. What is the difference between a TCP socket and a UDP datagram in terms of
reliability?
32. Which class in Java is used for sending and receiving UDP datagrams?
o A) DatagramPacket
o B) DatagramSocket
o C) ServerSocket
o D) Socket
o C) A server response
o A) URLConnection
o B) DatagramSocket
o C) ServerSocket, Socket
o D) ProxyServer
39. In the two-tier JDBC architecture, which component connects directly to the
database?
o A) Client
o B) Server
o C) Driver
o D) Database
41. Which JDBC driver type requires the installation of a database client?
o A) Type 1
o B) Type 2
o C) Type 3
o D) Type 4
42. Which of the following is an example of using JDBC for database connectivity?
o A) connect()
o B) openConnection()
o C) getConnection()
o D) createConnection()
o A) PreparedStatement is slower