I have noticed that many candidates who score well in the SCJP exam have at least six months hands-on programming practice with J2SE. But I have also heard of candidates who have done well with as little as three months practice. However, my suggestion is that you get 6-12 months hands-on practice in J2SE 5.0 before you go for the revised exam.
In addition to the fact that the material in the newly added topics is vast,
the questions in the exam can be rather challenging and often require you to carefully think through the problem. So, make sure that you get plenty of practice with problems involving the new features. Once you have adequate practice under your belt, you will be able to handle the questions in the exam.
For a quick overview of the new topics, you can start with the J2SE 5.0 release notes. Though the J2SE release was pretty recent, it is still possible to find a wealth of information on the Internet. Most importantly, for generics, be sure to follow the link to the generics tutorial. You may refer to the resources section, for the above-mentioned links and many more useful ones.
I have not come across too many good books to prepare for this exam, but I am listing a few useful ones in the resources section. No certification study guides are available yet for this exam, however the revised edition of the SCJP study guide by Kathy Sierra & Bert Bates is expected to be released very soon. Take code examples from the books, go through them and experiment with various possibilities.
It is important to note that a question might not pertain to a single objective, but may often test your expertise in various topics. For example, a generics question might use autoboxing and the enhanced for loop. So, while you practice one topic, try to associate it with other features as well.
The new SCJP 5.0 exam simulator from Whizlabs contains questions of varying difficulty levels matching the content and style changes in the revised SCJP exam. It provides five mock exams to practice on, an interactive quiz, and quick revision notes for last minute review.
Do's and Don'ts
Here are a few tips which I hope will help you perform better in the exam.
- In the Drag and Drop type questions, the answer gets reset if you try to review it. So, always complete and double check your answer before moving away from a Drag and Drop question.
- It would be helpful to solve Drag and Drop questions on a sheet of paper before actually attempting them in the test.
- The revised exam has more performance-based questions than knowledge-based questions requiring memorization of API details. So spend more time on hands-on practice, especially of commonly used methods, and avoid trying to memorize each and every API detail simply by reading.
- Be clear about the classes implementing the Collection types like List, Set, and Map. Be aware of which of these types support sorting, which allow duplicates, which give the best performance, and so on.
- Read the choices properly; don't get confused between 'import' statements and 'import static' statements.
- Remember that immutable string objects are returned by the String class. StringBuilder and StringBufffer both return mutable strings; the only difference between them is that StringBuffer is thread-safe, while the other is not.
- When you see the usage of varargs in a method, ensure that the ellipsis is appearing as the last argument to the method.
- Remember that the super type of generic Collection objects is Collection<?> and not Collection<Object>.
- Remember that since the wildcard (?) stands for an unknown type, you cannot add to generic types using wildcards.
- Know the distinction between Comparable and Comparator and the methods defined by these interfaces.
Sample Questions
Question No.:
1
Question Statement:
You want your code in Test.java to access the com.whiz.Utilities class which is stored within the myjar.jar file in the directory /jars. How would you compile your code?
Choices:
- javac -classpath /jars/myjar.jar Test.java
- javac -classpath /jars/ Test.java
- javac -classpath /jars Test.java
- javac -classpath /jars/myjar.jar/com/whiz Test.java
Difficulty Level:
Expert
Correct Choice:
A
Explanation:
Choice A is the correct answer.
The package-wise directory structure of the class is maintained within a JAR file, and Java follows exactly the same rules as for searching in ordinary directories. To include a JAR file in the class search path, the path must reference the JAR itself, not merely the directory that contains the JAR. So in this case, we need to set the classpath to myjar.jar and not to the jars folder.
javac -classpath /jars/myjar.jar Test.java
So choices B and C are incorrect. Choice D is incorrect because the classpath is always set to the root of the directory hierarchy mapping to the package. Here the package hierarchy is com/whiz, so the classpath must not be set to ‘/jars/myjar.jar/com/whiz’, but to /jars/myjar.jar, instead.
Question No.:
2
Question Statement:
Which of the following methods inserted independently at the indicated line will cause this code to compile correctly?
class SuperBase{}
class Base extends SuperBase{}
class Derived extends Base{}
class CovariantTest1 {
public Base getIt(){return new Base();}
}
class SubCovariantTest extends CovariantTest1 {
// Insert code here
}
Choices:
- public Derived getIt(){return new Derived();}
- public Base getIt(){return new Derived();}
- public SuperBase getIt() {return new Derived();}
- public SuperBase getIt() {return new Base();}
- public Derived getIt() {return new Base();}
Difficulty Level:
Expert
Correct Choice:
A, B
Explanation:
Choices A and B are the correct answers.
Support for covariant return types will allow an overriding method to return an object whose declared type is a subclass of the overridden method's return type. So choice A is correct. Choice B is correct because it conforms to overriding rules. The return type declared in the case of choices C and D is a super class of the super class method's return type, which is not allowed. Choice E is incorrect because it returns the super class object, while the declared return type is of the subclass.
A Final Word
Sun certification exams have always been respected in the IT industry, however the new improved SCJP 5.0 exam is going to be valued even higher than ever before, since it offers a more accurate reflection of a candidate's skill level, knowledge, and understanding.
Rest assured that focused preparation paired with sufficient practice will bring success within your reach.
Good luck to you!
Resources
General Reference
- Download the JSR from here.
Read about J2SE 5.0
Documentation on enhancments in J2SE 5.0
Tutorials
Download the Generics tutorial from here.
Books
Beta Books
Preparation Kit
Trainings
Discussion Forums
Java Technology Tech Tips
Check out these useful tips from Sun Developer Network.
Other Resources
|