Sun Certified Java Programmer 1.4 Exam Notes and tips
by Sandeep Desai
Books:
Thinking
in Java 3rd ed by Bruce Eckel
Sun
Certified Java Programmer by Kathy Sierra and Bert Bats
Mock
exams: Whizlabs SCJP 1.4 exam, Javaranch Mock exam list, JDiscuss
Compilation
Checklist
- watch for syntax first
matching braces ; etc
- watch for keywords in
code
- watch for
overload/overiding mix
- variable scoping
- if return type is
method returning variable
- for interface methods
write public abstract everywhere
- for interface variables
write public static final
- watch for final
variables being modified especially interface variables
- for default access
write friendly
- incorrect mixing of
primitives and wrappers
- watch if methods apply
to correct object e.g passing
- Boolean where boolean
expected
- for all top level
interface variables mark as public static final
- for all top level
interface methods mark as public abstract
- watch for class access
modifiers before determining method
- access modifier rules
- watch for misleading
indentation
- watch for invalid
switch such as missing case keyword
- two public classes in
the same file.
- main method calling a
non-static method.
- watch for implicit or
explicit access to this from static methods
- methods with the same
name as the constructor(s).
- local inner classes
trying to access non-final variables.
- case statements with
values out of permissible range.
- check for return
statement that can be reached, if method has return type
- thread initiation with
classes that don't have a run() method.
- watch for StringBuffer="abc";
- main() can be declared
final.
See
the following documents for SCJP 1.4 notes. They cover more topics than
required by SCJP 1.4
Fundamentals.java
demonstrates primitive data types, arrays, controls etc
Objects.java
inheritance, exceptions, inner classes
JavaCollections.java demonstrates how to
create Lists, Sets and Hash Tables (Associative Arrays)
JavaThreads.java demonstrated how to create
and use Threads