You are on page 1of 4

SCJP

Details
Delivered at: Authorized Worldwide Prometric Testing Centers
Prerequisites: None
Other exams/assignments required or this certiication: None
!xam t"#e: $ulti#le choice and drag and dro#
Num%er o questions: &'
Pass score: ()*++ , -+( o &'.
Time limit: /)' minutes
Exam Objectives
Section 1: Declarations, Initialization and Scoping
Develo# code that declares classes -including a%stract and all orms o nested
classes.0 interaces0 and enums0 and includes the a##ro#riate use o #ac1age and
im#ort statements -including static im#orts.*
Develo# code that declares an interace* Develo# code that im#lements or extends
one or more interaces* Develo# code that declares an a%stract class* Develo#
code that extends an a%stract class*
Develo# code that declares0 initializes0 and uses #rimitives0 arra"s0 enums0 and
o%2ects as static0 instance0 and local varia%les* Also0 use legal identiiers or
varia%le names*
3iven a code exam#le0 determine i a method is correctl" overriding or
overloading another method0 and identi" legal return values -including covariant
returns.0 or the method*
3iven a set o classes and su#erclasses0 develo# constructors or one or more o
the classes* 3iven a class declaration0 determine i a deault constructor will %e
created0 and i so0 determine the %ehavior o that constructor* 3iven a nested or
non4nested class listing0 write code to instantiate the class*
Section 2: Flow ontrol
Develo# code that im#lements an i or switch statement5 and identi" legal
argument t"#es or these statements*
Develo# code that im#lements all orms o loo#s and iterators0 including the use
o or0 the enhanced or loo# -or4each.0 do0 while0 la%els0 %rea10 and continue5
and ex#lain the values ta1en %" loo# counter varia%les during and ater loo#
execution*
Develo# code that ma1es use o assertions0 and distinguish a##ro#riate rom
ina##ro#riate uses o assertions*
Develo# code that ma1es use o exce#tions and exce#tion handling clauses -tr"0
catch0 inall".0 and declares methods and overriding methods that throw
exce#tions*
6ecognize the eect o an exce#tion arising at a s#eciied #oint in a code
ragment* Note that the exce#tion ma" %e a runtime exce#tion0 a chec1ed
exce#tion0 or an error*
6ecognize situations that will result in an" o the ollowing %eing thrown:
Arra"7ndexOutO8ounds!xce#tion0ClassCast!xce#tion0
7llegalArgument!xce#tion0 7llegal9tate!xce#tion0 NullPointer!xce#tion0
Num%er:ormat!xce#tion0 Assertion!rror0 !xce#tion7n7nitializer!rror0
9tac1Overlow!rror or NoClassDe:ound!rror* ;nderstand which o these are
thrown %" the virtual machine and recognize situations in which others should %e
thrown #rogramaticall"*
Section !: "#I ontents
Develo# code that uses the #rimitive wra##er classes -such as 8oolean0 Character0
Dou%le0 7nteger0 etc*.0 and/or auto%oxing < un%oxing* Discuss the dierences
%etween the 9tring0 9tring8uilder0 and 9tring8uer classes*
3iven a scenario involving navigating ile s"stems0 reading rom iles0 writing to
iles0 or interacting with the user0 develo# the correct solution using the ollowing
classes -sometimes in com%ination.0 rom 2ava*io: 8uered6eader0
8ueredWriter0 :ile0 :ile6eader0 :ileWriter0 PrintWriter0 and Console*
;se standard =>9! AP7s in the 2ava*text #ac1age to correctl" ormat or #arse
dates0 num%ers0 and currenc" values or a s#eciic locale5 and0 given a scenario0
determine the a##ro#riate methods to use i "ou want to use the deault locale or a
s#eciic locale* Descri%e the #ur#ose and use o the 2ava*util*?ocale class*
Write code that uses standard =>9! AP7s in the 2ava*util and 2ava*util*regex
#ac1ages to ormat or #arse strings or streams* :or strings0 write code that uses
the Pattern and $atcher classes and the 9tring*s#lit method* 6ecognize and use
regular ex#ression #atterns or matching -limited to: * -dot.0 @ -star.0 A -#lus.0 B0
Cd0 Cs0 Cw0 DE0 -..* The use o @0 A0 and B will %e limited to greed" quantiiers0 and
the #arenthesis o#erator will onl" %e used as a grou#ing mechanism0 not or
ca#turing content during matching* :or streams0 write code using the :ormatter
and 9canner classes and the PrintWriter*ormat/#rint methods* 6ecognize and use
ormatting #arameters -limited to: ,%0 ,c0 ,d0 ,0 ,s. in ormat strings*
Section $: onc%rrenc&
Write code to deine0 instantiate0 and start new threads using %oth
2ava*lang*Thread and 2ava*lang*6unna%le*
6ecognize the states in which a thread can exist0 and identi" wa"s in which a
thread can transition rom one state to another*
3iven a scenario0 write code that ma1es a##ro#riate use o o%2ect loc1ing to
#rotect static or instance varia%les rom concurrent access #ro%lems*
Section ': OO oncepts
Develo# code that im#lements tight enca#sulation0 loose cou#ling0 and high
cohesion in classes0 and descri%e the %eneits*
3iven a scenario0 develo# code that demonstrates the use o #ol"mor#hism*
:urther0 determine when casting will %e necessar" and recognize com#iler vs*
runtime errors related to o%2ect reerence casting*
!x#lain the eect o modiiers on inheritance with res#ect to constructors0
instance or static varia%les0 and instance or static methods*
3iven a scenario0 develo# code that declares and/or invo1es overridden or
overloaded methods and code that declares and/or invo1es su#erclass0 or
overloaded constructors*
Develo# code that im#lements Fis4aF and/or Fhas4aF relationshi#s*
Section (: ollections ) *enerics
3iven a design scenario0 determine which collection classes and/or interaces
should %e used to #ro#erl" im#lement that design0 including the use o the
Com#ara%le interace*
Distinguish %etween correct and incorrect overrides o corres#onding hashCode
and equals methods0 and ex#lain the dierence %etween GG and the equals
method*
Write code that uses the generic versions o the Collections AP70 in #articular0 the
9et0 ?ist0 and $a# interaces and im#lementation classes* 6ecognize the
limitations o the non4generic Collections AP7 and how to reactor code to use the
generic versions* Write code that uses the Naviga%le9et and Naviga%le$a#
interaces*
Develo# code that ma1es #ro#er use o t"#e #arameters in class/interace
declarations0 instance varia%les0 method arguments0 and return t"#es5 and write
generic methods or methods that ma1e use o wildcard t"#es and understand the
similarities and dierences %etween these two a##roaches*
;se ca#a%ilities in the 2ava*util #ac1age to write code to mani#ulate a list %"
sorting0 #erorming a %inar" search0 or converting the list to an arra"* ;se
ca#a%ilities in the 2ava*util #ac1age to write code to mani#ulate an arra" %"
sorting0 #erorming a %inar" search0 or converting the arra" to a list* ;se the
2ava*util*Com#arator and 2ava*lang*Com#ara%le interaces to aect the sorting o
lists and arra"s* :urthermore0 recognize the eect o the Fnatural orderingF o
#rimitive wra##er classes and 2ava*lang*9tring on sorting*
Section +: F%ndamentals
3iven a code exam#le and a scenario0 write code that uses the a##ro#riate access
modiiers0 #ac1age declarations0 and im#ort statements to interact with -through
access or inheritance. the code in the exam#le*
3iven an exam#le o a class and a command4line0 determine the ex#ected runtime
%ehavior*
Determine the eect u#on o%2ect reerences and #rimitive values when the" are
#assed into methods that #erorm assignments or other modi"ing o#erations on
the #arameters*
3iven a code exam#le0 recognize the #oint at which an o%2ect %ecomes eligi%le
or gar%age collection0 determine what is and is not guaranteed %" the gar%age
collection s"stem0 and recognize the %ehaviors o the O%2ect*inalize-. method*
3iven the ull"4qualiied name o a class that is de#lo"ed inside and/or outside a
=A6 ile0 construct the a##ro#riate director" structure or that class* 3iven a code
exam#le and a class#ath0 determine whether the class#ath will allow the code to
com#ile successull"*
Write code that correctl" a##lies the a##ro#riate o#erators including assignment
o#erators -limited to: G0 AG0 4G.0 arithmetic o#erators -limited to: A0 40 @0 /0 ,0 AA0
44.0 relational o#erators -limited to: H0 HG0 I0 IG0 GG0 JG.0 the instanceo o#erator0
logical o#erators -limited to: <0 K0 L0 J0 <<0 KK.0 and the conditional o#erator - B : .0
to #roduce a desired result* Write code that determines the equalit" o two o%2ects
or two #rimitives*

You might also like