What is This?
The following is material from
the Exam Cram 2 Java 2 Programmer book by Bill Brogden and
Marcus Green (covering the CX-310-035 exam). Coming in March 2003 -
(ISBN 0-7897-2861-3) from Que Certification. Books in the Exam Cram
series are designed to help you study for certification exams.
This series has been highly succesful because the books concentrate
on the relevant exam topics.
Exam Crams always include a Self Assessment
section. The intent of this material is to give the reader an
opportunity to assess what the exam they are studying for is about,
assess their goals, assess their current knowledge and skill levels,
and help them to determine if they are ready to tackle this exam or not.
There are two parts to our Self Assessment section. The first states
the skills an ideal candidate for the certification should have, and the
second helps you analyze how you can get there.
The Ideal Java Programmer Certification Candidate
One thing the ideal candidate does not have to have - although it
is highly recommended - is years of experience. The certification test does
not cover esoteric items that you pick up only by burning the midnight oil
while slaving over a two-year project. Instead, the test requires sound
knowledge of the fundamentals. You don’t have to use any fancy IDE to prepare
for the exam. The ideal candidate for the 1.4 certification exam will be able
to do the following:
- Create and run Java programs using the tools in Sun’s SDK version 1.4.
- Know all of the Java keywords and how they are used.
- Be able to create legal Java identifiers and reject illegal ones.
- Know the distinction between primitives and reference variables.
- Know how to create and initialize primitive variables, strings, and arrays.
- Know the range of values and limitations of all Java primitive variables.
- Understand what is meant by the scope of variables.
- Know the conventions that govern the way the Java Virtual Machine (JVM) starts and runs applications.
- Know what every Java mathematical, logical, and bitwise operator with primitives does.
- Be able to apply the functions in the Math class.
- Know what every Java operator with reference variables does, especially the operators that work with strings.
- Be able to decide when to use the equals method and when to use the == operator.
- Correctly use casts with primitive variables and reference variables.
- Use the primitive wrapper classes in the java.lang
package and predict the consequences of the immutability of wrapper class objects.
- Choose the correct access modifiers to control the visibility of classes, variables, and methods.
- Know the implications of declaring a class or method to be abstract.
- Know the implications of declaring a class, method, or variable to be final.
- Know the implications of declaring a method or variable to be static.
- Understand how to design programs using the concept of interfaces.
- Be able to use the interfaces specified in the java.lang and java.util packages.
- Predict when a default constructor will be created for a class.
- Distinguish between overloading and overriding methods and be able to write both types of code.
- Understand the uses of all forms of nested classes.
- Use all of Java’s program flow control statements, including break and continue.
- Create, throw, catch, and process exceptions and be able to
predict for which exceptions the compiler requires a specific provision.
- Understand what happens when an exception or error is thrown at any point in a program.
- Understand the benefits of encapsulation and inheritance in object-oriented design and be able to design classes that demonstrate the “is a” and “has a” relationships.
- Be able to predict when objects may be garbage collected and know the implications of Java’s garbage collection mechanism.
- Know how to create finalize methods and predict when a finalize method will run.
- Be able to write code that creates and starts threads using both the Runnable interface and extensions of the Thread class.
- Use the synchronized keyword to prevent problems with
multiple threads that interact with the same data.
- Write code using the wait, notify, and notifyAll
methods to coordinate threads.
- Write code and correctly use assertions as implemented in the 1.4 SDK.
- Control the operation of the assertion mechanism with command line options.
- Select the correct interface or class from the Collections
API to accomplish a particular task.
- Understand what constitutes a correct hashcode method
implementation and how it affects use of collections.
Note that this list does not include anything related to Java IO or
creating GUIs. This is a significant change from the 1.2 certification
(310-025) requirements.
Assessing Your Readiness
People come to Java from a variety of backgrounds; however, even
years of experience are not a guarantee of good preparation for the test. In
fact, even experienced Java programmers may have problems with the test if they
have let their fundamental skills slip.
Programming Background
- Do you have significant experience with C or C++? [Yes or No]
- No C or C++ experience: People frequently ask if they should
learn C or C++ before starting Java. Our emphatic answer is no,
Java is easier to learn than
C or C++. The idea that Java users should know C may have gotten started before
there were good books for Java beginners. Many schools have switched from C++
to Java for beginner programming courses.
- Yes: The syntax of Java will be familiar; just watch out for
some traps that we point out in the book. Don’t expect any of your C tricks to
work in Java.
- Do you have significant experience with creating
object-oriented programs? [Yes or No]
- Yes: Proceed to Question 3.
- No significant experience with creating object-oriented
programs: Java is the right place to start because it is so much simpler than
C++. Many good beginners books on Java are available. Thinking in Java,
Second Edition, by Bruce Eckel, is widely recommended as a good starting
book if your object-oriented programming background is weak. You can download
it for free from www.bruceeckel.com or purchase a paper copy (Prentice
Hall Computer Books, 2000, ISBN 0-13-027363-5). Bruce has a third edition under
development that is also downloadable for free.
- A very convenient resource to study object-oriented design is
the Java language itself. The source code for all of the standard library
classes plus some interesting examples comes with the SDK download.
- Have you written Java programs involving multiple classes and
multiple Threads in which garbage collection occurs?
- If not, you must expand your experience in these areas by
writing more programs that exercise various Java features.
- Is your experience entirely with Java 1.2 or 1.3?
- If it is, you must get some experience with Java at the SDK
1.4 level, especially with the Collections API classes and the assertion
mechanism.
- Do you have a good set of up-to-date Java resources?
- At a minimum, you should download the current Java
1.4 SDK and documentation from the Sun Web site
(http://java.sun.com) -this
is still referred to as SDK 1.4, although Sun marketing literature refers to
Java 2.
- You should download the current copy of Sun’s Java tutorial
from http://java.sun.com/docs/books/tutorial/. Sun is continually adding
to this, so refresh it if your copy is more than two months old. This tutorial
comes with many sample programs in a range of complexities. For test
preparation, you should concentrate on the simple ones.
- Books that were written
for the JDK 1.3 level of Java will still be useful for Java basics. The Collections-related
classes and assertions will be on the test but are missing from older books.
- In your current Java projects, does the first pass of the
compiler over your new class turn up frequent type-casting errors and other
mistakes related to Java basics?
- If so, use these errors to direct you to the topics you need
to review.
- Can you solve Java problems?
- For example, if you read the
“help me” messages on the comp.lang.java.programmer newsgroup, does the
correct solution for basic problems usually occur to you? (We’re not talking
about problems involving Swing or databases or other advanced topics, just the
basic problems.) If you are not presently familiar with reading
and posting to Usenet newsgroups,
a good starting point is http://groups.google.com
- Helping other programmers with Java problems is a great way
to assess your knowledge. Reading other people’s solutions to basic problems
will also help you assess your readiness.
I Think I’m Ready, so What’s Next?
Before you put up the money and schedule the test, try some of the
mock Java exams that can be found at various places on the Web. Two sites with
high quality mock exams are www.jchq.net and www.javaranch.com.
Unfortunately, not all certification-related Web sites have well-formulated
mock exams, so double check if you find contradictory information. When you can
do well on these tests and can check off every item on the list presented at
the start of this chapter, you are ready to sign up. Good luck!