ROGERS CADENHEAD
My Websites
Workbench
Drudge Retort
SportsFilter
My Books
Teach Yourself Java in 21 Days, Eighth Edition
Teach Yourself Java in 24 Hours, Eighth Edition
Teach Yourself C++ in 24 Hours |
Day 28: Regular Expressions
Certification Practice
Each chapter of the book ends with a Certification Practice question that's comparable to what you could expect to be asked on a Java certification test. Here's the answer for chapter 28:
Answer (d) is correct. The frame's size must be set by calling either the pack() or setSize() methods. The call to the pack() statement in its constructor method sets the size based on the size of the JLabel component inside the frame. The call to setSize() sets the size to the specified dimensions.
Answers (a) and (b) are correct, but less correct than answer (d).
Answer (c) is incorrect. Calling the construct of an object does not determine whether it is displayed correctly or not.
Return to Day 28
|
|