Java Basic


  1. What is a listener in context to event handling?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    A listener is a object that is notified when an event occurs. It has two major requirements first, it must have been registered with one or more sources to receive notification about specific event types, and secondly it must implement methods to receive and process these notifications.


  1. Which of these methods are used to register a mouse motion listener?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    addMouseMotionListner()



  1. Which of these methods are used to register a keyboard event listener?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    addKistener()


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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

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



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











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    Most of the event to which an applet response is generated by a user. Hence they are in Abstract Window Kit package, java.awt.event.