• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

text area

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the class java.awt.AWTEvent,which is the parent class upon which
jdk1.1 awt events are based there is a method called getID(),which phr
ase most accerrately describes in significance of the reture value of
this method?
A.It is a reference to the object directly affected by the cause of th
e event.
B.It is an indication of the nature of the cause of the event.
C.It is an indication of the position of the mouse when it caused the
event.
D.In the case of a mouse click,it is an indication of the text under t
he mouse at the time of the event.
E.It tells the state of certain keys on the keybord at the time of the
event.
F.It is an indication of the time at which the event occurred.
In my view option A ic correct,Let me know if i am right or put the right answer out there and state the reason behind the selection of your answer
 
Ranch Hand
Posts: 290
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
B)It is an indication of the nature of the cause of the event.
The above givn option seem's to be the only right one.It return's u the ID of the event occured.ID represents which event took place whether it was a MouseEvent, WindowEvent and what was it nature.Please correct me if i am wrong.
a)Option A would have been correct,Had it been about the getSource() method.Please correct me if i am wrong.
 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fraternity,
When you're posting questions would you please indicate which mock exam they are from. It might be one others would be interested in trying.
Thanks
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Fraternity and Nitin,
The correct answer is (B). The reason is that the getID() of java.awt.AWTEvent returns an int corresponding to event that caused it. For example in case of events caused by mouse are
Mouse Events
  • a mouse button is pressed
  • a mouse button is released
  • a mouse button is clicked (pressed and released)
  • the mouse cursor enters a component
  • the mouse cursor exits a component
    Mouse Motion Events
  • the mouse is moved
  • the mouse is dragged

    The values returned by the mouse event are
    elucidated in the java.awt.event.MouseEvent class
    Kindly refer to the API for the explanation of the same
  • static int MouseEvent.MOUSE_CLICKED
  • static int MouseEvent.MOUSE_DRAGGED
  • static int MouseEvent.MOUSE_RELEASED
  • static int MouseEvent.MOUSE_PRESSED
  • static int MouseEvent.MOUSE_FIRST
  • static int MouseEvent.MOUSE_LAST
  • static int MouseEvent.MOUSE_ENTERED
  • static int MouseEvent.MOUSE_EXITED
    Orginally posted by Fraternity
    <quote>
    In the class java.awt.AWTEvent,which is the parent class upon which
    jdk1.1 awt events are based there is a method called getID(),which phr
    ase most accerrately describes in significance of the reture value of
    this method?
    A.It is a reference to the object directly affected by the cause of th
    e event.
    B.It is an indication of the nature of the cause of the event.
    C.It is an indication of the position of the mouse when it caused the
    event.
    D.In the case of a mouse click,it is an indication of the text under t
    he mouse at the time of the event.
    E.It tells the state of certain keys on the keybord at the time of the
    event.
    F.It is an indication of the time at which the event occurred.
    In my view option A ic correct,Let me know if i am right or put the right answer out there
    and state the reason behind the selection of your answer
    </quote>
    Kindly get back incase further clarification is sought on this.
    Regards,
    Ravindra Mohan
    [This message has been edited by Ravindra Mohan (edited May 01, 2001).]
  •  
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic