本书以Java 2的SCJP和SCJD认证考试为目标,内容涵盖了SCJP和SCJD核心考试的所有考试要点,尽可能详细地介绍了参加SCJP和SCJD的应试者以及其他高级用户所应该掌握的所有技能。\r\n 本书在介绍考试要点时针对每个考试目标,使用了大量的插图、表格、试验、测试等,使读者在牢固掌握知识点的同时,轻松地获得丰富的实践经验。\r\n 本书由具有丰富SCJP和SCJD考试经验的专家编写,是参加SCJP和SCJD的考试人员的必备考试教材。本书也是一本学习使用Java 2的很好的参考书,还可以作为一些疑难问题的速查手册。
Part I The Programmer's Exam\r\n\r\n1 Language Fundamentals\r\n\r\nJava Programming Language Keywords (Exam Objective 4.4)\r\nAccess Modifiers\r\nClass, Method, and Variable Modifiers\r\nFlow Control\r\nError Handling\r\nPackage Control\r\nPrimitives\r\nVariable Keywords\r\nVoid Return Type Keyword\r\nUnused Reserved Words\r\nLiterals and Ranges of All Primitive Data Types (Exam Objective 4.6)\r\nRange of Primitive Types\r\nLiteral Values for All Primitive Types\r\nLiteral Values for Strings\r\nArray Declaration, Construction, and Initialization(Exam Objective 1.1)\r\nDeclaring an Array\r\nConstructing an Array\r\nInitializing an Array\r\nUsing a Variable or Array Element That Is Uninidalized and Unassigned (Exam Objective 4.5)\r\nPrimitive and Object Type Instance Variables\r\nLocal (Stack, Automatic) Primitives and Objects\r\nCommand-Line Arguments to Main (Exam Objective 4.3)\r\nExercise 1-1: Creating a Program That Outputs Command-Line Arguments\r\nTwo-Minute Drill\r\nQ&A Self Test\r\nSelf Test Answers\r\nExercise Answers\r\n\r\n2 Declarations and Access Control\r\n\r\nDeclarations and Modifiers (Exam Objective 1.2)\r\nClass Dedarations and Modifiers\r\nExercise 2-1: Creating an Abstract Superdass and Concrete Subdass\r\nMethod and Variable Declarations and Modifiers\r\nDeclaration Rules (Exam Objective 4.1)\r\nSource Files, Package Declarations, and Import Statements\r\nFormatting the Main() Method\r\nInterface Implementation (Exam Objective 4.2)\r\nDeclaring an Interface\r\nDeclaring Interface Constants\r\nImplementing an Interface\r\nTwo-Minute Drill\r\nQ&A SelfTest\r\nSelf Test Answers\r\n\r\n3 Operators and Assignments\r\n\r\nJava Operators (Exam Objective 5.1)\r\nAssignment Operators\r\nComparison Operators\r\ninstanceof Comparison\r\nEquality Operators\r\nArithmetic Operators\r\nShift Operators\r\nExercise 3-1: Using Shift Operators\r\nBitwise Operators\r\nBitwise Complement Operator\r\nConditional Operator\r\nPrimitive Casting\r\nExercise 3-2: Casting Primitives\r\nLogical Operators (Exam Objective 5.3)\r\nShort-Circuit Logical Operators\r\nLogical Operators (not Short-Circuit)\r\nPassing Variables into Methods (Exam Objective 5.4)\r\nPassing Object Reference Variables\r\nDoes Java Use Pass-By-Value Semantics?\r\nPassing Primitive Variables\r\nTwo-Minute Drill\r\nQ&A Self Test\r\nSelf Test Answers\r\nExercise Answers\r\n\r\n4 Flow Control, Exceptions, and Assertions\r\n\r\nWriting Code Using if and switch Statements (Exam Objective 2.1)\r\nif-else Branching\r\nswitch Statements\r\nExercise 4-1: Creating a switch-case Statement\r\nWriting Code Using Loops (Exam Objective 2.2)\r\nUsing while Loops\r\nUsing do-while Loops\r\nUsing for Loops\r\nUsing break and continue in for Loops\r\nUnlabeled Statements\r\nLabeled Statements\r\nExercise 4-2: Creating a Labeled while Loop\r\nHandling Exceptions (Exam Objectives 2.3 and 2.4)\r\nCatching an Exception Using try and catch\r\nUsing finally\r\nPropagating Uncaught Exceptions\r\nExercise 4-3: Propagating and Catching an Exception\r\nDefining Exceptions\r\nException Hierarchy\r\nHandling an Entire Class Hierarchy of Exceptions\r\nException Matching\r\nException Declaration and the Public Interface\r\nRethrowing the Same Exception\r\nExercise 4-4: Creating an Exception\r\nWorking with the Assertion Mechanism(Exam Objectives 2.4 and 2.5)\r\nAssertions Overview\r\nEnabling Assertions\r\nUsing Assertions Appropriately\r\nTwo-Minute Drill\r\nQ&A SelfTest\r\nSelf Test Answers\r\nExercise Answers\r\n\r\n5 Object Orientation, Overloading and Overriding,Constructors, and Return Types\r\n\r\nBenefits of Encapsulation (Exam Objective 6. l)\r\nIS-A and HAS-A Relationships\r\nOverridden and Overloaded Methods (Exam Objective 6.2)\r\nOverridden Methods\r\nOverloaded Methods\r\nConstructors and Instantiation (Exam Objectives 1.3, 6.3, 6.2)\r\nConstructor Basics\r\nDetermine Whether a Default Constructor W'dl Be Created\r\nOverloaded Constructors\r\nLegal Return Types (Exam Objective 1.4)\r\nReturn Type Declarations\r\nReturning a Value\r\nTwo-Minute Drill\r\nQ&A SelfTest\r\nSelf Test Answers\r\n\r\n6 Java. lang-The Hath Class, Strings, and Wrappers\r\n\r\nUsing the String Class (Exam Objective 8.2)\r\nStrings Are Immutable Objects\r\nImportant Facts About Strings and Memory\r\nImportant Methods in the String Class\r\nThe StringBuffer Class\r\nImportant Methods in the StringBuffer Class\r\nUsing the Math Class (Exam Objective 8.1)\r\nMethods of the java. lang. Math Class\r\nExercise 6-1: Using the Math Class\r\nExercise 6-2: Rounding Random Numbers\r\nMiscellaneous Math Class Facts\r\nUsing Wrapper Classes (Exam Objective 8.3)\r\nAn Overview of the Wrapper Classes\r\nCreating Wrapper Objects\r\nUsing Wrapper Conversion Utilities\r\nUsing equals0(Exam Objective 5.2)\r\nAn Overview of == and the equals() Method\r\nTwo-Minute Drill\r\nQ&A Self Test\r\nSelf Test Answers\r\nExercise Answers\r\n\r\n7 Objects and Collections\r\n\r\nOverriding hashCode() and equals() (Exam Objective 9.2)\r\nOverriding equals()\r\nOverriding hashCode()\r\nCollections (Exam Objective 9.1)\r\nSo What Do You Do with a Collection?\r\nGarbage Collection (Exam Objectives 3.1, 3.2, 3.3)\r\nOverview of Memory Management and Garbage collection\r\nOverview of Java's Garbage collector\r\nWriting Code That Explicitly Makes Objects Eligible for Collection\r\nForcing Garbage Collection\r\nCleaning Up Before Garbage Collection--the Finalize() Method\r\nTwo-Minute Drill\r\nQ&A Self Test\r\nSelf Test Answers\r\n\r\n8 Inner Classes\r\n\r\nInner Classes\r\nCoding a "Regular" Inner Class\r\nReferencing the Inner or Outer Instance from Within the Inner Class\r\nMethod-Local Inner Classes\r\nAnonymous Inner Classes\r\nStatic Nested Classes\r\nInstantiating a Static Nested Class\r\nTwo-Minute Drill\r\nQ&A Self Test\r\nSelf Test Answers\r\n\r\n9 Threads\r\n\r\nDefining, Instantiating, and Starting Threads (Exam Objective 7.1)\r\nDefining a Thread\r\nInstantiating a Thread\r\nStarting a Thread\r\nPreventing Thread Execution (Exam Objective 7.2)\r\nSleeping\r\nExercise 9-1: Creating a Thread and Putting It to Sleep\r\nThread Priorities and Yield\r\nSynchronizing Code (Exam Objective 7.3)\r\nSynchronization and Locks\r\nExercise 9-2: Synchronizing a Block of Code\r\nThread Interaction (Exam Objective 7.4)\r\nUsing notifyAll() When Many Threads May Be Waiting\r\nTwo-Minute Drill\r\nQ&A Self Test\r\nSelf Test Answers\r\nExercise Answers\r\n\r\nPart II The Developer's Exam\r\n\r\n10 Introduction to the 3CiD\r\n\r\nUnderstand the Sun Certified Java Developer Exam Process\r\nHow Does It Work?\r\nAre You a Good Candidate?\r\nHow Much Does It Cost?\r\nHow Long Does It Take?\r\nWhat's the Exam Deliverable?\r\nCan I Develop with an IDE?\r\nHow Is It Graded?\r\nWhat Are the Exam Assessors Thinking?\r\nWhat Are the Exam Assessors NOT Thinking?\r\nWhat's the Assignment Like?\r\nOverview of the Developer Exam Chapters\r\nKey Points Summary\r\n\r\n11 Coding Standards\r\n\r\nUse Sun Java Coding Standards\r\nSpacing Standards\r\nHow to Care for Your Curly Braces\r\nOur Comments About Comments\r\nDeclarations Are Fun\r\nKey Points Summary\r\n\r\n12 Clarity and Maintainability\r\n\r\nWrite Clear and Maintainable Code\r\nGeneral Programming Considerations\r\nFollow Basic OO Design Principles\r\nDon't Reinvent the Wheel\r\nHandle Errors Appropriately\r\nKey Points Summary\r\n\r\n13 Designing the Graphical User Interface\r\n\r\nCreating a Usable and Extensible GUI\r\nAn Overview of Technical Considerations for Your GUI\r\nIntroduction to Usability Design\r\n1. Use-Cases and the Business Function\r\n2. Principles of Good Screen Design\r\n3. Choosing Your Widgets, JTable, and What Army?\r\n4. Screen Layout for Your Project\r\n5. Menus and Navigation\r\n6. Messages, Feedback, and Dialog Boxes\r\n7. How to Use Colors in Your GUI\r\n8. How to Test Your GUI\r\nKey Points Summary\r\n\r\n14 Networking Issues\r\n\r\nUnderstand Networking Issues\r\nRMI and Sockets\r\nQuestions to Ask Yourself\r\nKey Points Summary\r\n\r\n15 Database Issues\r\n\r\nUnderstand Database Issues\r\nBuilding a Database\r\nQuestions to Ask Yourself\r\n\r\n16 Exam Documentation\r\n\r\nUnderstand the Sun Certified Java Developer Exam Documentation Requirements\r\nDeveloper's Documentation\r\nEnd User Documentation\r\njavadoc and You\r\nThe Developer's Choices Document\r\nThe Return of Comments and the Versions File\r\nKey Points Summary\r\n\r\n17 Final Submission and Essay\r\n\r\nPreparing the Final Submission\r\nFile Organization\r\nThe Follow-Up Essay\r\nKey Points Summary\r\n\r\nA About the CD\r\n\r\nSystem Requirements\r\nLearnKey Additional Training\r\nInstalling and Running MasterExam\r\nMasterExam\r\nElectronic Book\r\nHelp\r\nRemoving Installation(s)\r\nTechnical Support\r\nLearnKey Technical Support\r\n\r\nGlossary\r\nIndex
无封面