OCA Java SE 7 Programmer

Chapter 1: Getting Started with Java.

        Uses an overview of a simple Java application to present the major aspects of Java. The creation of a customer class is illustrated, along with the use of getter and setter methods. Also discussed is the development process, the types of Java applications supported, the documentation process in Java, and the use of annotations which have added much to the expressive power of Java.

Chapter 2: Java Data Types and Their Usage.

     Presents the primitive data types available in Java and their corresponding operators. Diagrams are used to explain how the program stack and heap relate to each other and how they affect the scope and lifetime of a variable. In addition, the use of the String and StringBuilder classes is illustrated and the difference between a class and an object is explained.

Chapter 3: Decision Constructs

         Focuses on the constructs used to make decisions in Java including the if and switch statements. As these constructs are dependent on logical expression, these types of expressions are covered. The use of the string based switch statement available with Java 7 is illustrated. The correct use of decision constructs is achieved by understanding and avoiding various pitfalls, such as the failure to use block statements and the multitude of problems that can occur when using floating point numbers in comparisons.

Chapter 4: Using Arrays and Collections

        Focuses on the use of arrays, along with the Arrays and ArrayList classes. Both single and multidimensional arrays are illustrated. The Arrays class is introduced, as it possesses many important methods for manipulating arrays such as filling and sorting arrays. The ArrayList class is important as it provides a more flexible container than an array for many problems.

Chapter 5: Looping Constructs

        Demonstrates the concept of iteration in Java, via constructs such as the while and for loops. These are covered along with common mistakes that can be made when using them. The use of the for-each statement and the iterator is presented, along with coverage of the infinite loop and the break and continue statements.

Chapter 6: Classes, Constructors, and Methods

         Deals with the creation and use of objects and uses the stack/heap to explain the process. The important Java initialization sequence is discussed. Overloading of constructors and methods are detailed, along with the concepts of signatures, instance/static class members, and immutable objects. Data encapsulation is illustrated throughout the chapter.

Chapter 7, Inheritance and Polymorphism

     Covers the critical topics of inheritance and polymorphism, with an enhanced discussion of constructors and methods. The use of a signature becomes important again when overriding is used. The power of the super keyword is explained in relation to constructors and methods. Scope is re-examined and the concepts of final and abstract classes are explored. The ever present Object class is also introduced.

Chapter 8: Handling Exceptions in an Application

        Covers exception handling including the use of the new try-with-resource block and the | operator in a catch block. Several guidelines and examples dealing with exception handling are provided to help the reader avoid common mistakes in their use.

Chapter 9: The Java Application

           Examines the use of packages in a Java application. This includes a discussion on the use of the package and import statements including the static import statement. Also discussed is the use of resource bundles to support an application that needs to address the international community and how to connect and use a database using JDBC. 

oracle_certified_professional_java_se_7_programmer_exams_1z0-804_and_1z0-805

Oracle Certified Associate, Java SE 7 Programmer Study Guide, Copyright © 2012 Packt Publishing

Leave a comment