Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Marcus green exam 3

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 59)
Which of the following statements are true?
1) The x,y coordinates of an instance of MouseEvent can be obtained using the getX() and getY() methods
2) The x,y coordinates of an instance of MouseEvent can be obtained using the X and Y integer fields
3) The time of a MouseEvent can be extracted using the getTime() method
4) The time of a MouseEvent can be extracted using the getWhen method
Objective 4.6)
1) The x,y coordinates of an instance of MouseEvent can be obtained using the getX() and getY() methods
4) 4) The time of a MouseEvent can be extracted using the getWhen method

If you chose option 4, referring to the mythical getTime method you have made a reasonable guess based on the normal conventions of Java. However the conventions do not always hold true. If you chose option 3 perhaps you are not as aware of the conventions as you should be.
http://www.jchq.net/tutorial/04_06Tut.htm
Is the correct answer only 1) the discussion of 4 is rather confused and I can not find any getWhen or getTime methods.
 
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Is the correct answer only 1) the discussion of 4 is rather confused and I can not find any getWhen or getTime methods


MouseEvent inherits getWhen() from its superclass InputEvent.
 
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.sun.com/j2se/1.4/docs/api/java/awt/event/MouseEvent.html
------------------

http://www.jchq.net Mock Exams, FAQ,
Tutorial, Links, Book reviews
Java 2 Exam Prep, 2nd Edition by Bill Brogden and Marcus Green
=================================================
JCHQ, Almost as good as JavaRanch
=================================================
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!