aspose file tools
The moose likes Mock Exam Errata and the fly likes MindQ's #56 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "MindQ Watch "MindQ New topic
Author

MindQ's #56

bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
I got this from http://www.javaranch.com/maha/_Mock_Exams/MindQ_s_Sun_Certified_Java_Programmer_Practice_Test.htm
Question #56
56. Which of the following describe the sequence of method calls that result in a component being redrawn?
a) invoke paint() directly
b) invoke update which calls paint()
c) invoke repaint() which invokes update(), which in turn invokes paint()
d) invoke repaint() which invokes paint directly
The given answer is C. I might be wrong on this one, but isn't A and B correct also. C is the preferred method of doing it, but can't you call the update() method or the paint() method also which will redraw the component.
Thanks,
Bill
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Hi Bill,
Think you're right. You can call update() and paint() directly although it's not recommended.
He uses 'sequence of method calls' in the question. Probably trying to make the point that calling repaint() is the acceptable call which sets off the proper sequence.
Jane


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
 
 
subject: MindQ's #56
 
Threads others viewed
Redraw == repaint() ?
Component to redraw what is the sequence??
some questions
mock exam question on repaint
MingQ mock exam ques 56 about paint()
developer file tools