I passed OCA
Java 7 exam Yesterday (93%).
My OCA journey started on faq page.
https://coderanch.com/how-to/java/OcajpFaq
The post about K&B 6 book was really useful to me to find the chapters that are sync with new exam.
https://coderanch.com/t/570259/java-SCJA/certification/Java-OCA#2667644
I started my preparation with
oca 7 training lab from epractize labs and
K&B book. My preparation is totally different from usual readers. I always like to write program puzzles to understand the concepts, of course oracle also expects your program knowledge and not the simple theory knowledge.
I coded separate programs for each exam objectives and studied all possible logical/compilation error/runtime error options. This assignment really helped to achieve great score in my exam.
You can also follow my tips:
Write a simple Java class by your own knowledge with package statements, import statements, class with constructors and methods.
Read and understand the structure of a Java class (package/import/class statement order)
Read and understand variables under class level scope
Read and understand variables under method level scope
Read and understand variables under loop/block level scope
Note: A set of curly brackets { } defines a particular scope
Write a simple Java program with both primitive and object variables.
Read and understand declaration of primitive variables (int total;)
Read and understand declaration of object variables (
String name;)
Read and understand initilization of primitive variables (default value for int will be 0)
Read and understand initilization of object variables (default value for String will be null)
Read and understand class type and interface type object variables (String firstName; Runnable myThread = new
Thread(); )
Read and understand array type object variables (int ids[]= new int[20]; )
Write a simple Java program to demonstrate object's life cycle.
Read and understand how Garbage Collection works in Java
Read and understand finalize method
Write a simple Java program to demonstrate String methods.
Read and understand about length method
Read and understand about trim method
Read and understand about replace method
Read and understand about replaceAll method
Read and understand about startsWith method
Read and understand about endsWith method
Read and understand about toCharArray method
Read and understand about charAt method
Read and understand about indexOf method
Read and understand String comparision by == or != operators and equals/compareTo methods
Write a simple Java program to demonstrate StringBuilder.
Read and understand how capacity can be determined in StringBuilder
Write a simple Java program to demonstrate operators and precedence.
Read and understand about all operators(assignment, Arithmetic, Unary, Bitwise, Bit Shift, Equality & Relational and Conditional)
Read and understand about instanceof operator
Read and understand about importance of parentheses to override operator precedence
Write a simple Java program to demonstrate if/else statement.
Read and understand about if clause evaluation
Write a simple Java program to demonstrate switch statement.
Read and understand about new changes in Java SE 7 (switch works with String class as well)
Write a simple Java program to demonstrate arrays.
Read and understand about possible way of declaring and initializing one-dimensional arrays
Read and understand about possible way of declaring and initializing multi-dimensional arrays
Write a simple Java program to ArrayList class.
Read and understand about creating ArrayList from collection
Read and understand about creating ArrayList from arrays
Read and understand about creating arrays from ArrayList
Write a simple Java program to understand while loop.
Remember that the while loop will not be executed if the condition fails
Write a simple Java program to understand do-while loop.
Remember that the do-while loop always execute at least once even if the condition fails
Write a simple Java program to understand for loop and enhanced for loop.
Read and understand about the usages of simple for loop and enhanced for loop
Write a simple Java program to understand about break and continue statements.
Read and understand about break and continue statements in for, while and do-while loops.
Write a Java program to understand methods and constructors.
Read and understand about the difference between constructor and method
Read and understand about overloaded method
Read and understand about default constructor and we can overload constructors
Write a Java program with static methods and static fields.
Read and understand about the usage of static keyword in fields and methods
Write a Java program to encapsulation.
Read and understand about the usage of private and public access modifiers
Write a Java program to demonstrate pass by value and pass by reference.
Read and understand about the effect of updating primitive values in a method call
Read and understand about the effect of updating object values in a method call
Write a Java program to demonstrate super class and sub class.
Read and understand about the usage of extends keyword
Read and understand about the usage of super keyword
Read and understand about the usage of this keyword
Write a Java program to demonstrate extending/implementing interfaces.
Read and understand about the usage of extends keyword
Read and understand about the usage of implements keyword
Read and understand about the usage type casting
Write a Java program to demonstrate abstract class.
Read and understand about the usage of abstract keyword
Read and understand about the usage of abstract methods
Read and understand about the usage of concrete methods
Write a Java program to demonstrate
polymorphism.
Read and understand about the usage of interfaces/abstract classes
Read and understand about 3 forms of polymorphism (Method overriding, Method overriding of the abstract class methods, Method overriding of interface)
Write a Java program to demonstrate exception handling.
Read and understand about the usage of simple try catch block
Read and understand about the usage of throws clause
Read and understand about the usage of throw keyword
Read and understand about the usage of finally block
Write a Java program to demonstrate Java SE 7 exception handling.
Read and understand about the usage of try catch with multiple handlers
Read and understand about the usage of try catch with automatic resource handling
After 2 months, I am planning to start my Java SE 7 OCP journey
Thanks to coderanchers, K&B and epractize labs.
Best Wishes,
John Marshall