Owl Teach Yourself Java 2 in 21 Days Pro, Third Edition
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / THANKS
ROGERS CADENHEAD

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. Edit

Return to Day 28

HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / THANKS

Valid HTML 4.01!

Valid CSS!