Writing the Second Edition The exam for the Sun Certified Programmer for Java 2 (SCPJ2) Platform has changed considerably since the first edition of this book was published. The most noticeable change in the current version of the exam (SCPJ2 1.4) is the removal of GUI and I/O, and the shifting of emphasis toward the core features of the language. In our opinion, the new exam demands an even greater understanding and actual experience of the language, rather than mere recitation of facts. Proficiency in the language is the key to success. The I/O and GUI topics of the first edition have been eliminated, as they have no relevance for the SCPJ2 exam. These topics are more relevant for the Sun Certified Developer for Java 2 (SCDJ2) Platform exam and, therefore, relegated to a possible future volume on the Developer exam topics. Since the emphasis of the SCPJ2 exam is on the core features of Java, the second edition provides an even greater in-depth coverage of the relevant topics. The book covers not just the exam objectives, but also supplementary topics that aid in mastering the exam topics. The second edition is still a one-source guide for the SCPJ2 exam: it provides a mixture of theory and practice for the exam. Use the book to learn Java, pass the SCPJ2 exam, and afterwards, use it as a handy language guide. The book also has an appendix devoted to the SCPJ2 Upgrade exam. To facilitate preparation for the exams, the second edition comes with a CD containing additional resources, including several mock exams developed by Whizlabs Software. We have taken into consideration the feedback we have received from readers. The many hours spent in handling the deluge of e-mail have not been in vain. Every single e-mail is appreciated and is hereby acknowledged. Preparing the second edition dispelled all our illusions about second editions being, to put it colloquially, a piece of cake. Every sentence from the first edition has been weighed carefully, and not many paragraphs have escaped rewriting. UML (Unified Modeling Language) is also extensively employed in this edition. Numerous new review questions have been added. In covering the new topics and expanding the existing ones, new examples, figures, and tables were also specifically created for the second edition. About This Book This book provides an extensive coverage of the Java programming language and its core Application Programming Interfaces (APIs), with particular emphasis on its syntax and usage. The book is primarily intended for professionals who want to prepare for the Sun Certified Programmer for Java 2 Platform 1.4 exam (referred to as the SCPJ2 exam), but it is readily accessible to any programmer who wants to master the language. For both purposes, it provides an in-depth coverage of essential features of the language and its core APIs. There is a great and increasing demand for certified Java programmers. Sun Microsystems has defined the SCPJ2 exam as one that professionals can take to validate their skills. The certification provides the IT industry with the standard to use for hiring such professionals, and allows the professionals to turn their Java skills into credentials that are important for career advancement. The book helps the reader master all core features of the Java language, and this mastering of the language can culminate in accomplishing the exam. It provides an extensive coverage of all the objectives defined for the exam by Sun. Since the exam objectives are selective, they do not cover many of the essential features of Java. This book provides extensive coverage of additional topics that every Java programmer should master in order to be proficient in this field. In this regard, the book is a comprehensive primer for learning the Java programming language. This book is not a complete reference for Java, as it does not attempt to list every member of every class from the Java System Development Kit (SDK) API documentation. Its purpose is not to document the Java SDK APIs. It is also not a book on teaching programming technique s. Its emphasis is on the Java programming language features, their syntax and correct usage. The book assumes a background in programming. We believe the exam is accessible to any programmer who works through the book. A Java programmer can easily skip over material that is well understood and concentrate on parts that need reinforcing, whereas a programmer new to Java will find the concepts explained from basic principles. Each topic is explained and discussed thoroughly with examples, and backed by review questions and exercises to reinforce the concepts. The book is not biased toward any particular platform, but provides platform-specific details where necessary. Using the Book The reader can choose a linear or a non-linear route through the book, depending on her programming background. Non-Java programmers wishing to migrate to Java can read Chapter 1, which provides a short introduction to object-oriented programming concepts, and the procedure for compiling and running Java applications. For those preparing for the SCPJ2 exam, the book has a separate appendix providing all the pertinent information on taking the exam. The table of contents, listings of tables, examples, and figures, and a comprehensive index facilitate locating topics discussed in the book. In particular, we draw attention to the following features of the book: Exam and Supplementary Objectives Exam objectives are stated clearly at the start of every chapter, together with any supplementary objectives. The objectives are defined by Sun and are organized into major sections, detailing the curriculum for the exam. The book is organized into chapters that logically follow the order of these major sections. The objectives are reproduced in a separate appendix where, for each section of the syllabus, study notes are included to point the reader to topics essential for the exam. We believe that the supplementary objectives are important to the ultimate goal of mastering the language. Review questions are provided after every major topic, in order to test and reinforce the material. These review questions reflect the kind of questions that can be asked on the actual exam. Annotated answers to the review questions are provided in a separate appendix. Example Source Code We encourage experimenting with the code examples in order to reinforce the material from the book. These can be downloaded from the book Web site (see p. xxxv). Java code is written in a mono-spaced font . Lines of code in the examples or in code snippets are referenced in the text by a number, which is specified by using a single-line comment in the code. For example, in the following code snippet, the call to the method doSomethingInteresting() hopefully does something interesting at (1). // ... doSomethingInteresting(); // (1) // ... Names of classes and interfaces start with an uppercase letter. Names of packages, variables, and methods start with a lowercase letter. Constants are all in uppercase letters. Chapter Summary Each chapter concludes with a summary of the topics, pointing out the major concepts discussed in the chapter. Programming Exercises Programming exercises at the end of each chapter provide the opportunity to put concepts into practice. Solutions to the programming exercises are provided in a separate appendix. Mock Exam A complete mock exam is provided in a separate appendix, which the reader can try when she is ready. In addition, the accompanying CD contains several mock exams for the SCPJ2 1.4 exam. Java 2 SDK and API Documentation A vertical gray bar is used to highlight methods and fields found in the classes of the core Java APIs. Any explanation following the API information is also similarly highlighted. In order to obtain optimal benefit from using this book in preparing for the SCPJ2 exam, we strongly recommend installing the latest version (at least 1.4) of the SDK and its accompanying API documentation. The book focuses solely on Java 2, and does not acknowledge previous versions. Java 2 Platform Upgrade Exam For those who have taken the Sun Certified Programmer for Java 2 Platform 1.2 Exam, and would like to prepare for the Sun Certified Programmer for Java 2 Platform Upgrade Exam, we have provided an appendix with details of the upgrade exam. The appendix contains the upgrade exam objectives, and for each section of the syllabus, study notes are included to point the reader to topics essential for the upgrade exam. The accompanying CD contains mock exams for the upgrade exam. Accompanying CD The accompanying CD contains a wealth of information to help prepare for the exam, and provides numerous mock exams for the candidate to test her skills. The software included simulates near exam-like conditions in order to acquaint the candidate with the exam environment. Appendix H provides details about the contents of the CD. Book Web Sites This book is backed by Web sites providing auxiliary material: http://www.ii.uib.no/
|