thank you all! I have passed the SCJP5.0 today with 87%. Worst result was on API (70%), I have really bad memory. :-)
To contribute something back to the community, here is my "cheat sheet":
top level classes can only be "default", public, static or final
wait() and notify*() only in synchronized code
private constructor can not be called from constructor of subclass.
there is automatic narrowing conversion of literals and final variables for byte, short, char, int (if fits to new range)
array creation: given size, or initializer, not both!
non-public main() compiles, but doesn't run.
implicit method modifiers in interfaces: public abstract
implicit field modifiers in interfaces: public static final
if the subclass overrides a method, then the parent constructor calls the overriding one.
member variables are resolved at compile time
(int)-2.9 == -2
there can be method with the same name as the constructor. It even can return void.
"byte" += "int" compiles and works (possibly loose prec.)
Arrays of generic type: only unbounded wildcards.
private is private to the class, not to the object
final field must be initialized in initializer, constructor, or at the place of declaration
static final field must be initialized in static initializer or at the palce of declaration
static fields/methods/classes can be declared only in static or top-level classes.
Set, List and Map strenghten the requirements on equals and hashCode contracts
It is possible to declare variables of abstract types.
Externalizable class must have no-args constructor
default serialization writes non-static and non-transient fields.
It is not possible to convert or cast arrays of primitives.
Anybody knows about a job for <a href="http://cern.ch/jvalenta/valenta-cv.pdf" target="_blank" rel="nofollow">SCJP5.0, Ph.D. in Software Engineering, 2 years Java, C, C++</a> in Montreal, QC, Canada? Thanks!
Congrates Jan. I did not understand 2 posints from the cheet. 1.It is possible to declare variables of abstract types. 2.if the subclass overrides a method, then the parent constructor calls the overriding one. Please give me an example for this. Regards, Sri.
Jan, I see now what you meant about "variables of abstract types." I had misinterpreted what you were saying. You are correct.
Joined: Nov 30, 2005
thanks for all the congratulations. :-)
1. member variables are resolved at compile time
2. Externalizable class must have no-args constructor 3. default serialization writes non-static and non-transient fields
What to add?? These are just facts..
It is definitelly worth to write a couple of simple programs with streams, there are drag&drop questions about them.
Arul, I think the mocks are enough only if you are both very experienced and very well theoretically educated. I definitely recommend some text/book where stuff is well organized, etc. I have used Heller, Roberts: Copmlete Java 2 Certification Study Guide, Fifth edition, and couple of other texts on generics, collections and streams, mostly tutorials from sun.com.
Marc, sorry for not being clear, I should still study some English. :-)
Joined: Sep 30, 2005
Hi jan Thanks a lot!! Will deifnitely bug you once the exam date come closer. Btw im planning sometime in jan.. not sure abt the date..