Sams Teach Yourself Java in 21 Days (Covering Java 8 and Android)
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS DAY / NEXT DAY / THANKS
ROGERS CADENHEAD

Day 21: Writing Java Servlets and Java Server Pages

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

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 21

HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS DAY / NEXT DAY / THANKS

Valid HTML 4.01!

Valid CSS!