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

Day 22: Writing Java Servlets

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 22:

Answer (b) is correct. The case 1 statement is not executed because c is equal to the character '1', not the integer value 1. The case 2 statement is not executed either, so the only statement executed is the default, which increments the value of x by 1.

Answers (a), (c), and (d) are incorrect. Edit

Return to Day 22

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

Valid HTML 4.01!

Valid CSS!