Free Web Hosting by Netfirms
Web Hosting by Netfirms | Free Domain Names by Netfirms

SUN CERTIFIED JAVA PROGRAMMER FOR JAVA2 PLATFORM 1.4

Table of Contents

Basics of Java programming

Language fundamentals

Operators and assignments

Declarations and Access Control

Control flow, exception handling and assertions

Object-oriented programming

Nested classes and Interfaces

Object lifetime

Threads

Fundamental Classes

Collections and Maps


This work is primarily intended to be a guideline for those taking the Sun Certified Programmer for the Java 2 Platform 1.4 examination. It is recommended that the candidate check Sun's website for any changes in the pattern of the exam.

Copyright © 2005 Rohit George.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled “GNU
Free Documentation License”.


Basics of Java programming

Top


Language fundamentals

abstract

default

implements

protected

throw

assert

do

import

public

throws

boolean

double

instanceof

return

transient

break

else

int

short

try

byte

extends

interface

static

void

case

final

long

strictfp

volatile

catch

finally

native

super

while

char

float

new

switch


class

for

package

synchronize


continue

if

private

This


null

true

false



const

goto




byte

8 bits

-27

+27-1

Boolean

short

16 bits

-215

+215-1

Short

int

32 bits

-231

+231-1

Integer

long

64 bits

-263

+263-1

Long

char

16 bits

0x0

0xffff

Character

float

32 bits



Float

double

64 bits



Double

boolean


true or false only

Boolean

Top


Operators and assignments

Postfix

[] . (parameters) (expr)++ (expr)--

Unary prefix

++(expr) --(expr) +(expr) -(expr)

Unary prefix creation and cast

new (type)

Multiplicative

* / %

Additive

+ -

Shift

<< >> >>>

Relational

< <= > >= instanceof

Equality

== !=

Bitwise/logical AND

&

Bitwise/logical XOR

^

Bitwise/logical OR

|

Conditional AND

&&

Conditional OR

||

conditional

?:

Assignment

= += -= *= /= %= <<= >>= >>>= &= ^= |=

Top


Declarations and Access Control

Top


Control flow, exception handling and assertions

Top


Object-oriented programming

Top


Nested classes and Interfaces

Entity

Declaration

Context

Accessib-ility Modifiers

Enclosing Instance

Direct Access to Enclosing Context

Declarations in Entity Body

Top-Level Class (or Interface)

Package

Public or default

No

N/A

All that are valid in a class (or interface) body

Static Member Class (or Interface)12

As static member of enclosing class or interface

All

No

Static members in enclosing context

All that are valid in a class (or interface) body

Non-static Member Class13

As non-static member of enclosing class or interface

All

Yes

All members in enclosing context

Only non-static declarations + final static fields

Local Class14

In block with non-static context

None

Yes

All members in enclosing context + final local variables

Only non-static declarations + final static fields

In block with static context

None

No

Static members in enclosing context + final local variables

Only non-static declarations + final static fields

Anonymous Class

As expression in non-static context

None

Yes

All members in enclosing context + final local variables

Only non-static declarations + final static fields

As expression in static context

None

No

Static members in enclosing context + final local variables

Only non-static declarations + final static fields



Top


Object lifetime

Top


Threads

Top


Fundamental Classes

Top


Collections and Maps

Set

HashSet

TreeSet

LinkedHashSet


List

Vector

ArrayList

LinkedList


Map

HashMap

HashTable

TreeMap

LinkedHashMap



Top


List of References

A thorough reading of the following is highly recommended, much of the info in the notes is from them.

[1] “A Programmer's Guide to Java Certification, Second Edition” - Khalid A. Mughal and Rolf W. Rasmussen.

Pearson Education



[2] “Java Certification Success, Part 1 SCJP”

IBM developerWorks



[3] “Sun Certified Java Programmer Pre-Exam Essentials” - Dylan Walsh



[4] “Java Tips” - Heather MacKenzie



Disclaimers

No claims are made about the accuracy of this document and no responsibility is taken for any errors.

The original author cannot control, and may not be aware of, derived versions of the document.

Copyright © 2005 Rohit George.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is included in the section entitled “GNU
Free Documentation License”.


1That means the variable must be declared final for implicit narrowing to take place.

2String, Date and wrapper classes override equals(). StringBuffer does not.

3Where element type 2 must be assignable to type 1.

4The list cannot contain the array name.

5Since the static context is not executed in the context of any object.

6For example java.lang.Cloneable, java.io.Serializable, java.util.EventListener

7They inherit from Exception

8System classes are those in java.* packages

9In the case of Overloading return type may vary.

10Somewhat clashing with the subset ideal in exceptions.

11Instance members are overridden. Instance variables, static methods and static variables are hidden.

12Can only be nested within other static members or top-level classes and interfaces.

13Cannot have static members.

14Cannot be specified with the keyword static.

15Obtained by calling Runtime.getRuntime()

16Which returns int

Top

For a PDF version of this document, click here SCJP1.4 Guide (PDF)

To Download Acrobat Reader to read the PDF, click here Acrobat Reader

Sun Certified Programmer for Java 2 Platform 1.4

(c) 2005 Rohit George