Java 2 Exam Cram
Authors: Bill Brogden
Venue:  (1999)

From the Book: Introduction Introduction Welcome to Java 2 Exam Cram. This book is intended to prepare you for taking and passing the Sun Certified Programmer for the Java 2 Platform exam, number 310-025 as administered by the Sylvan-Prometric testing organization. This Introduction explains Suns certification program in general and talks about how the Exam Cram series can help you prepare for certification exams. Exam Cram books help you understand and appreciate the subjects and materials you need to pass certification exams. Exam Cram books are aimed strictly at test preparation and review. They do not teach you everything you need to know about a topic. Instead, the series presents and dissects the questions and problems that youre likely to encounter on a test. In preparing this book, Ive worked from preparation guides and tests and from a battery of third-party test preparation tools. The aim of the Exam Cram series is to bring together as much information as possible about certification exams. Nevertheless, to completely prepare yourself for any test, I recommend that you begin by taking the Self-Assessment included in this book immediately following this Introduction. This tool will help you evaluate your knowledge base against the requirements for the Sun Certified Programmer for the Java 2 Platform exam under both ideal and real circumstances. Based on what you learn from that exercise, you might decide to begin your studies with some classroom training, or to pick up and read one of the many study guides available from third-party vendors, including The Coriolis Groups Exam Prep series. I also strongly recommend that you install, configure, and fool around with the Java 2 (Java Development Kit 1.2) software and documentation, because nothing beats hands-on experience and familiarity when it comes to understanding the questions youre likely to encounter on a certification test. Book learning is essential, but hands-on experience is the best teacher of all! Who Is This Book For? This book is for you if:  You are a programmer who is already familiar with Java to some extent and are seeking certification. Maybe you have written a couple of applets or applications and worked through one or two of the introductory books.  You have been working with Java on and off for a couple of years. You have even done a fairly large application, but it was with Java 1.0 and you have not done much with Java 1.1 or Java 2.  You are an experienced Java programmer but you have heard that even experienced programmers can fail the exam because it covers a lot of basics that you dont use every day.  You see that more and more employment ads, especially for the more interesting Internet-related jobs, mention Java and you think that "Sun Certified Programmer" would help your resume. This book is not for you if:  You are just getting started in programming and have little experience in any language.  You have done a lot of programming but none of it in an object-oriented language.  You have a theoretical understanding of Java but want to work with a lot of code examples so you will feel comfortable.  You are curious about this suddenly popular language called Java and what to find out what the fuss is about. If you fall into the category that indicates this book is not for you, you should start your Java certification path somewhere else. Please consider my other book, Java 2 Exam Prep (The Coriolis Group, ISBN: 1-57610-261-0) because it is full of programming exercises and has even more sample exam questions. Suns Java Certifications Sun has several forms of certification for Java as listed on the Web page at http://suned.sun.com/usa/cert_test.html. Here is the list of Java certifications that are possible:  Sun Certified Programmer for the Java Platform (JDK 1.0.2)  Sun Certified Programmer for the Java Platform (JDK 1.1)  Sun Certified Programmer for the Java Platform (Java 2)  Sun Certified Developer for the Java Platform (JDK 1.0.2)  Sun Certified Developer for the Java Platform (JDK 1.1)  Sun Certified Architect for Java Technology (Java 2 Platform) The certified developer tests involve a programming project that you can work on in your own time, followed by an exam with questions related to your design decisions. The architect certification appears to involve more theoretical design considerations. Signing Up To Take The Exam After you have studied this book, taken the example exam, and feel ready to tackle the real thing, you first have to deal with Suns Education branch. Sun will take your money ($150 in the U.S.) and give you a voucher number. You will have to provide a unique ID number, such as your Social Security number. All of this can be done by telephone with a credit card. The number to call for U.S. residents is (800) 422-8020. For other locations, start at the following Web page to locate a Sun representative: http://suned.sun.com/usa/cert_reg.html. Sun will give you a voucher number that you can use to sign up for the test and will then mail you paperwork with the voucher number (but you can sign up with just the voucher number so you dont need to wait for the mail). Signing Up With Sylvan Prometric After you have gotten a voucher number, you can contact Sylvan to locate a nearby testing center that administers the test and get an appointment. Here are the most recent telephone numbers for various areas:  Asia Australia 61-2-9414-3663  Germany 49-2159-9233-50  Japan 813-3269-9620  Latin America 1-612-820-5200  USA and Canada 1-800-795-3926  UK 44-181-607-3850 To schedule an exam, call at least one day in advance, but do not count on getting an early appointment. In some areas of the U.S., tests are booked up for weeks in advance. To cancel or reschedule an exam, you must call at least 12 hours before the scheduled test time (or you may be charged). When calling Sylvan Prometric, please have the following information ready for the telesales staffer who handles your call:  Your name, organization, and mailing address.  A unique Test ID. (For most U.S. citizens, this will be your Social Security number. Citizens of other nations can use their taxpayer IDs or make other arrangements with the order taker.)  The name and number of the exam you wish to take. (For this book, the exam number is 310-025, and the exam name is "Sun Certified Programmer for the Java 2 Platform.")  The voucher number you obtained from Sun. You may also locate a testing center on the Web. The main Web page for Sylvan-Prometric is http://www.sylvanprometric.com/. A very complete locator system is provided at http://www.sylvanprometric.com/testcenterlocator/zipcode.asp. When using this system to locate a nearby test center use "Sun Micro Educational Services" for the "Testing Partner" input, then select the exam (310-025) and the state. This produces a list of cities, testing centers, and contact numbers. Pick one of these and it will even give you a map to the testing center. Taking The Test When you show up for your appointment, be sure that you bring two forms of identification that have your signature on them, including one with a photograph. You wont be allowed to take any printed material into the testing environment, but you can study The Cram Sheet from the front of this book while you are waiting. Try to arrive at least 15 minutes before the scheduled time slot. All exams are completely closed-book. In fact, you will not be permitted to take anything with you into the testing area, but you will be furnished with a blank sheet of paper and a pen. I suggest that you immediately write down on that sheet of paper all the information youve memorized from the Cram Sheet. You will have some time to compose yourself, to record memorized information, and even to take a sample orientation exam before you must begin the real thing. I suggest you take the orientation test before taking your first exam, but because theyre all more or less identical in layout, behavior, and controls, you probably wont need to do this more than once. About This Book Each topical Exam Cram chapter follows a regular structure, along with graphical cues about important or useful information. Heres the structure of a typical chapter:  Opening Hotlists Each chapter begins with a list of the terms, tools, and techniques that you must learn and understand before you can be fully conversant with that chapters subject matter. I follow the hotlists with one or two introductory paragraphs to set the stage for the rest of the chapter.  Topical Coverage After the opening hotlists, each chapter covers a series of at least four topics related to the chapters subject title. Throughout this section, I highlight topics or concepts likely to appear on a test using a special Study Alert layout, like this: This is what a Study Alert looks like. Normally, a Study Alert stresses concepts, terms, software, or activities that are likely to relate to one or more certification test questions. For that reason, any information found offset in a Study Alert format is worthy of unusual attentiveness on your part. Pay close attention to material flagged as a Study Alert; although all the information in this book pertains to what you need to know to pass the exam, I flag certain items that are really important. Youll find what appears in the meat of each chapter to be worth knowing, too, when preparing for the test. Because this books material is very condensed, I recommend that you use this book along with other resources to achieve the maximum benefit.  Practice Questions Although I talk about test questions and topics throughout each chapter, this section presents a series of mock test questions and explanations of both correct and incorrect answers. I also try to point out especially tricky questions by using a special icon, like this: Ordinarily, this icon flags the presence of a particularly devious inquiry, if not an outright trick question. Trick questions are calculated to be answered incorrectly if not read more than once, and carefully, at that. Although theyre not ubiquitous, such questions make regular appearances on the exams. Thats why I say exam questions are as much about reading comprehension as they are about knowing your material inside out and backwards.  Details And Resources Every chapter ends with a section titled "Need To Know More?", which provides direct pointers to Sun and third-party resources offering more details on the chapters subject. In addition, this section tries to rank or at least rate the quality and thoroughness of the topics coverage by each resource. If you find a resource you like in this collection, use it, but dont feel compelled to use all the resources. On the other hand, I only recommend resources I use on a regular basis, so none of our recommendations will be a waste of your time or money. The bulk of the book follows this chapter structure slavishly, but there are a few other elements that Id like to point out. Chapter 15 is a sample test that provides a good review of the material presented throughout the book to ensure youre ready for the exam. Chapter 16 is an answer key to the sample test that appears in Chapter 15. Additionally, youll find a glossary that explains terms and an index that you can use to track down terms as they appear in the text, as I mentioned before. Finally, the tear-out Cram Sheet attached next to the inside front cover of this Exam Cram book represents a condensed and compiled collection of facts, figures, and tips that I think you should memorize before taking the test. Because you can dump this information out of your head onto a piece of paper before answering any exam questions, you can master this information by brute forceyou only need to remember it long enough to write it down when you walk into the test room. You might even want to look at it in the car or in the lobby of the testing center just before you walk in to take the test. Typographic Conventions Listings of Java programs and code fragments will be in a monospaced font. In some cases, I have used a line number at the start of each line of code to facilitate referring to a particular statement as in the following example: 1. int n = 42 ; 2. long j = 4096L ; // appending L or l makes it a long 3. long k = 0xFFFFFFL ; 4. byte b2 = 010 ; // an octal literal If you are typing code into an editor to experiment with one of my examples, do not type the line numbers. When Java keywords, class names, and other words or phrases that could literally occur in a Java program are mentioned in the text, they are bolded. For example, "classes similar to java.lang.Integer are provided to wrap byte, short, and long integer primitives." Many classes and Java keywords are similar to words used in normal discussions, such as Integer in the preceding sentence. The bolding convention is used to alert you to the fact that the word or phrase is being used in the Java programming sense. You should also pay close attention to the occurrence of uppercase letters. The use in Java of Boolean and boolean is not interchangeable. Finally, I will occasionally use italics to emphasize a term, particularly on the first use. How To Use This Book The order of chapters is what I consider to be a logical progression for someone who wants to review all of the topics on the exam. If you feel that you are already up to speed with Java at the JDK 1.1 level, the main thing you will need to review is the Collections API as discussed in Chapter 10. In any case, you should try all of the questions in the chapters and the sample test in Chapter 15. Providing Feedback If you find errors, sections that could be worded more clearly, or questions that seem deceptive, please feel free to let me know by email at wbrogden@bga.com. Earlier study guides for Java certification (not published by Coriolis) were marred by extensive typos and other errors. I have tried to double-check everything in this book, but if some errors did slip through, they will be documented as soon as I find out about them and reported at http://www.lanw.com/books/errata/default.htm.