SCJP Sun Certified Programmer for Java 5 Study Guide (Exam 310-055) (Certification Press)

Kathy Sierra

Bert Bates

McGraw-Hill/Osborne

New York, Chicago, San Francisco, Lisbon, London, Madrid, Mexico City, Milan, New Delhi, San Juan, Seoul, Singapore, Sydney, Toronto

McGraw-Hill is an independent entity from Sun Microsystems, Inc. and is not affiliated with Sun Microsystems, Inc. in any manner. This publication and CD may be used in assisting students to prepare for the Sun Certified Java Programmer Exam. Neither Sun Microsystems nor McGraw-Hill warrants that use of this publication and CD will ensure passing the relevant exam. Sun, sun Microsystems, and the Sun Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries

McGraw-Hill/Osborne2100 Powell Street, 10th FloorEmeryville, California 94608U.S.A.

To arrange bulk purchase discounts for sales promotions, premiums, or fund-raisers, please contact McGraw-Hill/Osborne at the above address.

Copyright © 2006 by The McGraw-Hill Companies.

All rights reserved. Printed in the United States of America. Except as permitted under the Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher, with the exception that the program listings may be entered, stored, and executed in a computer system, but they may not be reproduced for publication.

1234567890 DOC DOC 0198765

Book p/n 0-07-225361-4 and CD p/n 0-07-225362-2parts of

ISBN 0-07-225360-6

Acquisitions Editor Timothy Green

Project Editor Jody McKenzie

Acquisitions Coordinator Jennifer Housh

Proofreader Linda Medoff

Indexer Jack Lewis

Composition Bert BatesMidori Batten

Series Design Roberta SteelePeter Hancik

Cover Series Design Peter Grame

This book was published with Adobe® InDesign®

Information has been obtained by McGraw-Hill/Osborne from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill/Osborne, or others, McGraw-Hill/ Osborne does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from use of such information.

To the Java Community.

Contributors

About the Authors

Kathy Sierra was a lead developer for the SCJP exam for Java 5. Sierra worked as a Sun "master trainer," and in 1997, founded Javaranch.com, the world's largest Java community website. Her bestselling Java books have won multiple Software Development Magazine awards, and she is a founding member of Sun's Java Champions program.

Bert Bates was a lead developer for many of Sun's Java certification exams including the SCJP for Java 5. He is also a forum moderator on Javaranch.com, and has been developing software for more than 20 years. Bert is the co-author of several bestselling Java books, and he's a founding member of Sun's Java Champions program.

About the Technical Review Team

Johannes de Jong has been the leader of our technical review teams for ever and ever. (He has more patience than any three people we know.) For this book, he led our biggest team ever. Our sincere thanks go out to the following volunteers who were knowledgeable, diligent, patient, and picky, picky, picky!

Rob Ross, Nicholas Cheung, Jane Griscti, Ilja Preuss, Vincent Brabant, Kudret Serin, Bill Seipel, Jing Yi, Ginu Jacob George, Radiya, LuAnn Mazza, Anshu Mishra, Anandhi Navaneethakrishnan, Didier Varon, Mary McCartney, Harsha Pherwani, Abhishek Misra, and Suman Das.

About LearnKey

LearnKey provides self-paced learning content and multimedia delivery solutions to enhance personal skills and business productivity. LearnKey claims the largest library of rich streaming-media training content that engages learners in dynamic media-rich instruction complete with video clips, audio, full motion graphics, and animated illustrations. LearnKey can be found on the Web at www.LearnKey.com.

Technical Review Superstars

We don't know who burned the most midnight oil, but we can (and did) count everybody's edits—so in order of most edits made, we proudly present our Superstars.

Our top honors go to Kristin Stromberg—every time you see a semicolon used correctly, tip your hat to Kristin. Next up is Burk Hufnagel who fixed more code than we care to admit. Bill Mietelski and Gian Franco Casula caught every kind of error we threw at them—awesome job, guys! Devender Thareja made sure we didn't use too much slang, and Mark Spritzler kept the humor coming. Mikalai Zaikin and Seema Manivannan made great catches every step of the way, and Marilyn de Queiroz and Valentin Crettaz both put in another stellar performance (saving our butts yet again). Marcelo Ortega, Jef Cumps (another veteran), Andrew Monkhouse, and Jeroen Sterken rounded out our crew of superstars—thanks to you all. Jim Yingst was a member of the Sun exam creation team, and he helped us write and review some of the twistier questions in the book (bwa-ha-ha-ha).

As always, every time you read a clean page, thank our reviewers, and if you do catch an error, it's most certainly because your authors messed up. And oh, one last thanks to Johannes. You rule dude!

Acknowledgements

Kathy and Bert would like to thank the following people:

Категории