To pass the Sun Certified Programmer for Java 2 Platform 1.4 exam (SCPJ2 1.4) you need this book. It is written for any experienced programmer (with or without previous knowledge of Java) interested in mastering the Java programming language and passing the SCPJ2 1.4 exam.
A Programmer's Guide to Java™ Certification, Second Edition, contains detailed coverage of all exam topics and objectives, helpful code examples, exercises, review questions, and several full practice exams. In addition, as a comprehensive primer to the Java programming language, this book is an invaluable reference tool for the reader.
This new edition has been thoroughly updated to focus on the latest version of the exam (CX-310-035). In particular, it contains more in-depth explanations of the syntax and usage of core language features that are now emphasized on the exam. The accompanying CD contains a version of the SCPJ2 1.4 Exam Simulator developed by Whizlabs Software, which includes several mock exams and simulates the exam-taking experience. The CD also contains the complete source code for all the examples, and solutions to the programming exercises.
What you will find in this book:
Table of Contents
List of Tables.
List of Examples.
List of
Figures.
Foreword.
Preface.
About This Book.
Using the Book.
Book Web Sites.
Request for Feedback.
About the Authors.
Acknowledgments (First Edition).
Acknowledgments (Second Edition).
1. Basics of Java Programming.
Classes.
Objects.
Object References.
Instance Members.
Static Members.
Inheritance.
Aggregation.
Tenets of Java.
Java Programs.
Sample Java Application.
Compiling and Running an Application.
Review Questions.
Chapter Summary.
Programming Exercises.
2. Language Fundamentals.
Identifiers.
Keywords.
Literals.
Integer Literals.
Floating-point Literals.
Boolean Literals.
Character Literals.
String Literals.
White Spaces.
Comments.
Review Questions.
Primitive Data Types.
Character Type.
Floating-point Types.
Boolean Type.
Review Questions.
Variable Declarations.
Object Reference Variables.
Lifetime of Variables.
Initial Values for Variables.
Initializing Local Variables of Primitive Data Types.
Initializing Local Reference Variables.
Review Questions.
Java Source File Structure.
The main() Method.
Chapter Summary.
Programming Exercises.
3. Operators and Assignments.
Evaluation order of operands.
Conversions.
Narrowing and Widening Conversions.
Numeric Promotions.
Type Conversion Contexts.
Simple Assignment Operator =.
Assigning References.
Multiple Assignments.
Numeric Type Conversions on Assignment.
Review Questions.
Arithmetic Operators: *, /, %, +, -.
Evaluation Order in Arithmetic Expressions.
Range of Numeric Values.
Unary Arithmetic Operators: -, +.
Multiplicative Binary Operators: *, /, %.
Additive Binary Operators: +, -.
Numeric Promotions in Arithmetic Expressions.
Arithmetic Compound Assignment Operators: *=, /=, %=, +=, -=.
Review Questions.
The Binary String