The Sun’s Java Certification and its possible role in the
Download
Report
Transcript The Sun’s Java Certification and its possible role in the
The Sun’s Java Certification
and its Possible Role in the
Joint Teaching Material
Nataša Ibrajter
Faculty of Science
Department of Mathematics and Informatics
Novi Sad
1
Contents
Kinds of Sun Certified Exams
Why Become Java 2 Certified?
Developer's Certification Exam (SCJD)
The Programmer’s Exam (SCJP)
Some Characteristic Questions
A Proposal for the Joint Java Course
The NS Experience
Impact on the Joint Material
2
Kinds of Sun Certified Exams
3
Kinds of Sun Certified Exams
Sun Certified Programmer (SCJP)
CX-310-035 Programmer’s Exam
Sun Certified Developer (SCJD)
CX-310-252A Developer’s Programming
Assignment
CX-310-027 Developer’s Essay Exam
4
Why Become Java 2 Certified?
It provides proof of professional achievement.
It increases one’s marketability.
It provides greater opportunity for
advancement in one’s field.
It is increasingly found as a requirement for
some types of advanced training.
It raises customer confidence in you and your
company’s services.
5
Developer's Certification Exam
(SCJD)
It consists of two parts:
a project assignment and
a follow-up exam
The assignment describes a task that
starts with some code supplied with a
project description. Person who takes
the exam is supposed to finish the
project.
6
Developer's Certification Exam
(SCJD)
The follow-up exam has at least three
aspects:
Java's features and libraries,
knowledge and understanding of one's own
classes,
defending the choices one made writing
code.
7
Developer's Certification Exam
(SCJD)
I/O streams
Swing
The AWT event
model
Object serialization
RMI
javadoc
Packages
Threads
Interfaces
8
The Programmer’s Exam (SCJP)
Language fundamentals
Source files
Keywords and identifiers
Primitive data types
Literals
boolean literals
char literals
9
The Programmer’s Exam (SCJP)
Arrays
Class fundamentals
integral literals
floating-point literals
string literals
the main() method
variables and initialization
Argument passing: by reference or by
value
Garbage collection
10
The Programmer’s Exam (SCJP)
Operators and assignments
Evaluation order
The unary operators
++ and -+ and ~
!
cast operator
11
The Programmer’s Exam (SCJP)
The arithmetic operators
* and /
%
+ and arithmetic error conditions
The shift operators: >>, << and >>>
fundamentals of shifting
shifting negative numbers
arithmetic promotion of operands
reduction of the right operand
12
The Programmer’s Exam (SCJP)
The comparison operators
<, <=, > and >=
the instanceof operator
the equality comparison operators: == and !=
Logical operators: &&, || and !
Short-circuiting
Bitwise operators: &, |, ^ and ~
The conditional operator: ? :
The assignment operator
13
The Programmer’s Exam (SCJP)
Modifiers
Modifier overview
The access modifiers
public
private
default
protected
subclasses and method privacy
14
The Programmer’s Exam (SCJP)
Other modifiers
final
abstract
static
static initilalizers
native
transient
synchronized
volatile
Modifiers and features
15
The Programmer’s Exam (SCJP)
Converting and casting
Explicit and implicit type changes
Primitives and conversion
primitive conversion: assignment
assignment conversion, narrower primitives and
literal values
primitive conversion: method call
primitive conversion: arithmetic promotion
Primitives and casting
16
The Programmer’s Exam (SCJP)
Object reference conversion
object reference assignment conversion
object method-call conversion
Object reference casting
Flow control, assertions and exception
handling
The loop constructs
while
do
for
break and continue statements in loops
17
The Programmer’s Exam (SCJP)
Selection statements
Exceptions
if-else construct
switch construct
flow of control in exception conditions
throwing exceptions
Assertions
assertions and compilation
runtime enabling of assertions
using assertions
18
The Programmer’s Exam (SCJP)
Objects and classes
Benefits of object-oriented implementation
Implementing OO relationships
Overloading and overriding
encapsulation
re-use
overloading method names
method overriding
Constructors and subclassing
overloading constructors
19
The Programmer’s Exam (SCJP)
Inner classes
the enclosing this reference and construction of inner
classes
member classes
classes defined inside methods
Threads
Thread fundamentals
what a thread executes
when execution ends
thread states
thread priorities
20
The Programmer’s Exam (SCJP)
Controlling threads
yielding
suspending
sleeping
blocking
monitor states
scheluduling implementation
Monitors, wait and notify
the object lock and synchronization
21
The Programmer’s Exam (SCJP)
wait and notify
the class lock
beyond the pure model
deadlock
another way to synchronize
java.lang and java.util packages
The Object class
The Math class
The wrapper classes
22
The Programmer’s Exam (SCJP)
Strings
the String class
the StringBuffer class
string concatenation easy way
The collections API
collection types
collections, equality and sorting
the hashCode method
collection implementations in the API
collections and code maintenance
23
Some Characteristic Questions
Language fundamentals
Consider the following line of code:
int[] x = new int[25];
After execution, which statements are
true? Choose all that apply.
1.
2.
3.
4.
5.
x[24] is 0.
x[24] is undefined.
x[25] is 0.
x[0] is null.
x.length is 25.
24
Some Characteristic Questions
Operators and assignments
What results from the following fragment
of code?
1.
2.
3.
4.
5.
6.
int x = 1;
String [] names = {“Fred”, “Jim”, “Sheila”};
names[--x] += “.”;
for(int i =0; i<names.length; i++){
System.out.println(names[i]);
}
25
Some Characteristic Questions
1.
2.
3.
4.
5.
The output includes Fred. with a trailing period.
The output includes Jim. with a trailing period.
The output includes Sheila. with a trailing
period.
None of the outputs show a trailing period.
An ArrayIndexOutOfBoundsException is thrown.
26
Some Characteristic Questions
Modifiers
Given the following code and making no other
changes, which combination of access modifiers
(public, protected or private) can legally be placed
before aMethod() on line 2 and be placed before
aMethod() on line 6?
1. class SuperDuper{
2. void aMethod(){}
3. }
4.
5. class Sub extends SuperDuper{
6. void aMethod(){}
7. }
27
Some Characteristic Questions
1.
2.
3.
4.
5.
line
line
line
line
line
2:
2:
2:
2:
2:
public; line 6: private
protected; line 6: private
default; line 6: private
private; line 6: protected
public; line 6: protected
28
Some Characteristic Questions
Converting and casting
Will the following code compile?
1. byte b = 2;
2. byte b1 = 3;
3. b = b * b1;
1.
Yes
2.
No
29
Some Characteristic Questions
class hierarchy for next question
Animal
Mammal
Dog
Cat
implements
Washer
Raccoon
implements
Washer
SwampThing
30
Some Characteristic Questions
Consider the following code:
1.
2.
3.
4.
5.
6.
Dog
rover, fido;
Animal anim;
rover = new Dog();
anim = rover;
fido = (Dog)anim;
Which of the following statements are
true? Choose one.
31
Some Characteristic Questions
1.
2.
3.
4.
5.
Line 5. will not compile.
Line 6. will not compile.
The code will compile but will throw an
exception at line 6.
The code will compile and run.
The code will compile and run, but the cast in
line 6 is not required and can be eliminated
32
Some Characteristic Questions
Flow control, assertions and exception
handling
Consider the following code:
1.
2.
3.
4.
5.
6.
7.
8.
for(int i=0; i<2; i++){
for(int j=0; j<3; j++){
if(i == j){
continue;
}
System.out.println(“i = ”+i+” j = ”+j);
}
}
33
Some Characteristic Questions
Which lines would be part of the output?
Choose all that apply.
1.
2.
3.
4.
5.
6.
i
i
i
i
i
i
=0
=0
=0
=1
=1
=1
j
j
j
j
j
j
=
=
=
=
=
=
0
1
2
0
1
2
34
Some Characteristic Questions
Objects and classes
Considering this class:
1. public class Test1{
2. public float aMethod(float a, float b){}
3.
4. }
Which of the following methods would be
legal if added (individually) at line 3?
Choose all that apply.
35
Some Characteristic Questions
1.
2.
3.
4.
5.
public int aMethod(int a, int b){}
public float aMethod(float a, float b){}
public float aMethod(float a, float b, int c)
throws Exception{}
public float aMethod(float c, float d){}
private float aMethod(int a, int b, int c){}
36
Some Characteristic Questions
Threads
A Java monitor must either extend
Thread or implement Runnable.
1.
2.
True
False
The java.lang and java.util packages
In the following code fragment, line 4 is
executed.
37
Some Characteristic Questions
1. String s1 = “xyz”;
2. String s2 = “xyz”;
3. if (s1 == s2)
4. System.out.println(“4”);
1.
True
2.
False
1. String s1 = “xyz”;
2. String s2 = new String(s1);
3. if (s1 == s2)
4. System.out.println(“4”);
1.
True
2.
False
38
A Proposal for the Joint Java
Course
Part I - Imperative Java programming
Introduction (in case that Java is the first
programming language)
The language overview (elements of Java)
Simple data types
Expressions and control structures
Structured data types: arrays
Methods
Recursion
Complex examples with arrays (searching and
sorting)
39
A Proposal for the Joint Java
Course
Part II - OOP in Java and advanced topics
Introduction to OOP (OOP in general, place of
Java, its development...)
Basic notations of OOP
Classes and objects. Class methods and variables.
Object creation
Inheritance and polymorphism
Concatenated list structures
Trees
Packages
Interfaces
40
A Proposal for the Joint Java
Course
Abstract classes
Introduction to UML
Exceptions
GUI development
Class libraries, Java Collection Framework
Reflection in Java
Threads
Basic notions of WWW
Applets
Remote Method Invocation
41
A Proposal for the Joint Java
Course
Part III - Environments for Java
programming
Usage of J2SE JDK 1.xx
Part IV - Java programming at large
Introducing SE principles in Java
programming
42
The NS Experience
Our students are obliged to take part in not
less than 70% of practical exercises, not less
than 50% of exercises and not less than 30%
of lectures.
The exam consists of the practical part (which
is taken during the practical exercises) and of
the test.
The Java certification is used as a template
for the test.
43
The NS Experience
Students mostly show weakness in
understanding how Java solves OOP issues
like overriding, overloading, program flow etc,
not in understanding theoretical basics of
OOP.
The test tests practical knowledge in Java,
not the theoretical knowledge in OOP.
If the students missed to study some aspect
of a problem taking practical part of the
exam, the test forces them to restudy the
problem.
44
The NS Experience
70% of Programmer’s Exam questions
covered by our course
More than 90% excluding major sections like
threads and assertions
Therefore, we cannot ‘blindly’ use any of the
questions
Should we change our course to cover more
questions?
Suggestion: No
However, some compatibility useful
45
Impact on the Joint Material
From our experience: without references to
the Java Certification we cover about
70%/90% of the questions
For the creation of the Joint Material,
occasional references to Java Certification
exam questions are useful to
see what the industry thinks is important
check for omissions
46