32
Sun Java Certification by Wyndham Ackroyd

Java Certification

  • Upload
    aamir97

  • View
    1.749

  • Download
    0

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Java Certification

Sun Java Certification

by Wyndham Ackroyd

Page 2: Java Certification

Overview Part I

What is certification, FAQ’s and types of certification

Part II Sun Certified Java Programmer Objectives

and resources Part III

Sample Questions Summary Questions

Page 3: Java Certification

Part I

What is certification, FAQ’s and

types of certification

Page 4: Java Certification

Where do I start? Do I want to be certified (am I mad enough to

be certified)? Certification is tough but rewarding. You will be more

confident and capable using Java after certification What is java certification?

It is an industry recognised certification A way of proving that you understand java and can

use java technology Recognised by employers and peers alike

How do I get certified? You have to choose a certification option Study the material Book, sit and pass the corresponding exam

Page 5: Java Certification

How do I get certified? Choose a certification option (exam)

There are 8 certification options Study the material

Create a plan of attack Buy books and/or courses Drag-net the web Meet up with like minded people and set targets and

goals Book, sit and pass the corresponding exam

Buy an exam voucher Book the exam online from the Sun site. A third party

actually hosts the exam (called a Prometric Testing Centre) not Sun

Turn up for a couple of hours and answer the minimum number of multi choice questions in the allotted time

Page 6: Java Certification

Java Certification Roadmap

Shamelessly plagiarised directly from http://www.sun.com/training/certification/java/

Page 7: Java Certification

Sun Professional Certifications Sun Certified Associate for the Java Platform, Standard Edition - New! Sun Certified Programmer for the Java 2 Platform, Standard Edition -

J2SE 5.0 now available! Sun Certified Developer for the Java 2 Platform, Standard Edition * Sun Certified Web Component Developer for the Java 2 Platform,

Enterprise Edition Sun Certified Business Component Developer for the Java 2

Platform, Enterprise Edition Sun Certified Developer for Java Web Services Sun Certified Enterprise Architect for the Java 2 Platform,

Enterprise Edition * Sun Certified Mobile Application Developer for the Java 2 Platform,

Micro Edition

* An assignment needs to be completed

Shamelessly plagiarised directly from http://www.sun.com/training/certification/java/

Page 8: Java Certification

TLA’s and Acronyms

SCJP – Sun Certified Java ProgrammerSCJD – Sun Certified Java DeveloperSCWCD – Sun Certified Web Component DeveloperSCBCD – Sun Certified Business Component DeveloperSCDJWS – Sun Certified Developer for Java Web Services SMAD – Sun Certified Mobile Application Developer

J2SE – Java 2 Standard EditionJ2EE – Java 2 Enterprise EditionJ2ME – Java 2 Micro Edition

CX-310-035 – an apparently random number for SCJP 1.4CX-310-055 – an apparently random number for SCJP 1.5

Page 9: Java Certification

Other Certification Questions

Q. How long does my certification last?A. This has changed a lot over the years. The current policy is that any certification gained after

August the 1st, 2003 is valid forever! See http://www.sun.com/training/certification/faq/

Q. How do I choose which certification exam to study for?A. Talk to somebody who has already certified and visit the following site:

http://www.sun.com/training/certification/objectives/index.xml

Q. I’ve decided to do the programmer certification, which one should I do? 4.0 or 5.0?

A. Version 5 is new, therefore it is harder to find resources (books and sites etc). As it becomes more established more resources will be available.

Q. How long will it take me to study enough to sit the exam?A. It depends on your experience, but I suggest you should earmark 3 months of committed part

time study, which at times can get quite intensive.

Q. Do I have to keep my certifications up-to-date?A. Most people sit a certification exam and move onto a specialist exam rather than keeping their

certification versions current. However, there are Platform Upgrade exams and Sun recommend you keep your certification up-to-date. See http://www.sun.com/training/certification/faq/

Page 10: Java Certification

Part II

Sun Certified Java Programmer Objectives and resources

Page 11: Java Certification

SCJP - Facts and Figures

SCJP J2SE 4.0CX-310-035

SCJP J2SE 5.0CX-310-055

Duration 120 minutes(2 hours)

175 minutes(nearly 3 hours!)

Number of Questions

61 72

Pass Mark 52%(32 out of 61)

59%(43 out of 72)

Intensity High! High!Cost $150 USD $150 USD

Page 12: Java Certification

Exam ObjectivesSectio

nSCJP 4.0 SCJP 5.0

1 Declarations and Access Control Declarations, Initialization and Scoping

2 Flow control, Assertions, and Exception Handling

Flow Control

3 Garbage Collection API Contents

4 Language Fundamentals Concurrency

5 Operators and Assignments OO Concepts

6 Overloading, Overriding, Runtime Type and Object Orientation

Collections / Generics

7 Threads Fundamentals

8 Fundamental Classes in the java.lang Package

9 The Collections Framework

Page 13: Java Certification

Resources Books Online Resources Colleagues Practice exams (beware, some

might be worse than useless) There are free ones You can buy one from Sun Books often come with a sample exam

Page 14: Java Certification

Online resourceswww.lanw.com/java/javacert/default.htm www.aniyog.com/java/certification.htm www.javaranch.com/mock.jsp www.javaranch.com/maha/_Mock_Exams/_mock_exams.html http://www.javaranch.com/mock.html certification.about.com/od/freequestions/ www.michael-thomas.com/tech/java/java_info.htm www.jchq.net/mockexams/exam2.htm www.jchq.net/mockexams/exam1.htm www.levteck.com/ www.sap-img.com/java/java-programmer-certification-mock-exam-no-

answers.htm www.akgupta.com/Java/mock_exam.htm www.javaprepare.com/faq.html http://www.jdiscuss.com/ http://bobcat.webappcabaret.net/javachina/faq/05.htm http://java.sun.com/docs/books/jls/second_edition/html/j.title.doc.html

Page 15: Java Certification

BooksThe Good.

The certification book Java 2 Sun Certified Programmer & Developer. Osborne ISBN 0-07-222684-6. It costs $114.99 so it's a bit expensive! I've found it brilliant! The writing style is conversational and at times funny!

The BadThe other book I've tried is Exam Cram 2 - Java 2 Programmer. Que ISBN 0-7897-2861-3. It costs $76.99. I think it is hopeless, if anybody else is struggling with it, try the book above.

The UglyUgly isn't as bad as bad! Java in a Nutshell O'Reilly ISBN 0-596-00283-1. Costs $135.00. It isn't a certification book, but it is really concise if heavy going (that's why I called it ugly). A great reference book and excellent for a through, in-depth description of stuff that is relevant for the exam.

Page 16: Java Certification

Tricks and tips for study

Try to get a group together to study with, it makes it easier.

As you progress through your study you will begin to get a ‘feeling’ for what the question is asking.

Read, practice, sit practice exams and discuss with colleagues over and over again.

If you buy a certification book (recommended) be prepared to read your chosen study book 3 times.

Ask your employer to pay for the exam. They may pay or refund you if you pass the exam?

Page 17: Java Certification

Tricks and tips for the Exam

All questions are weighted equally So, answer all the ‘easy’ questions first

You could spend 10 minutes on a difficult question and get 2 marks.

Or you could spend 10 minutes on 5 questions and get 10 marks.

Mark questions for review if you have spent too long on them and go back to them at the end if you still have time.

Page 18: Java Certification

Exam format The questions may include a code snippet or it

may be text question. The questions are multi-choice.

But don’t be fooled! It’s harder than “Who wants to be a Millionaire”!

You are in a strange room with no windows, you’re not allowed to talk to anybody and there are cameras watching you all the time!

The exam is computer based: The computer is locked down There is no internet access There is a timer (so you know how much time you

have left)

Page 19: Java Certification

Example QuestionThis is a typical ‘easy’ question.

Which two are equal? (Choose two)A. 32 / 4;B. (8 >> 2) << 4;C. 2 ^ 5;D. 128 >>> 2;E. (2 << 1) * (32 >> 3);F. 2 >> 5

Reproduced without permission from the brilliant: Java 2 Sun Certified Programmer & Developer Osborne

Page 20: Java Certification

Example Solution

Which two are equal? (Choose two)A. 32 / 4; // 8B. (8 >> 2) << 4; // 32C. 2 ^ 5; // 7D. 128 >>> 2; // 32E. (2 << 1) * (32 >> 3); // 16F. 2 >> 5 // 0

It’s harder than Who wants to be a Millionaire, ‘cos: there are more than 4 answers to choose from you have to know all the answers to get the question

right you don’t get a score of 25% if you just make up any

old answers

Page 21: Java Certification

Part III

Sample Questions

Page 22: Java Certification

Literals

What's going on with this?

byte b = 7;

byte c = b + 7; // gives a compile error

byte c += 7; // this is OK

Page 23: Java Certification

Literals

The difference is between literals and variables.

Number literals (1, 2, 3, to 9999 etc) can be implicitly cast to bytes and the numeric operators (+, - / etc) always return an int

And you can't automatically assign int variable into a smaller primitive without casting (whereas you can with a literal if it is small enough - the compiler knows)

Page 24: Java Certification

Literalsbyte b = 7; byte c = b + 7; // gives a compile error byte c += 7; // this is OK

So:

byte b = 7; This works 'cos literal 7 can be assigned to byte

c = b + 7; This generates an ERROR! It returns an explicit int, which can't go into a byte (I think the reason is that the compiler can never be entirely sure what is in a variable, but it knows what a literal's value is)

byte c += 7; // This is OK. Why? Because there is no int variable involved, only the literal 7.

Page 25: Java Certification

Logical Operators

What do you expect the output to be?

if (1>2 && 2>1 | true)System.out.print("elephant tusk");

elseSystem.out.print("rhino");

Page 26: Java Certification

Logical Operators

I expected the result to be derived like this:

1 is not greater than 2, so don't bother to check 2 > 1.

Then do the OR, which returns true. So we have "false or true". Which gives true! So the answer

should be “elephant tusk”.

Page 27: Java Certification

Logical OperatorsThe answer is not elephant tusk! The result is rhino! (Normally we'd avoid this confusion by writing with brackets)

Before explaining the code lets check out this:

if (1>2 && 2>1 || true)System.out.print("elephant tusk");

elseSystem.out.print("rhino");

The above returns elephant tusk (which is the intuitive result), which roughly evaluates as:

1 is not greater than 2, so don't bother to check 2 > 1. Then do the OR, which returns true. So we evaluate "false or true". Which gives true!" as expected.

Page 28: Java Certification

Logical Operators

Question: What is the difference between:

(1>2 && 2>1 || true) and

(1>2 && 2>1 | true)

Page 29: Java Certification

Logical Operators

Question: What is the difference between:

(1>2 && 2>1 || true) and

(1>2 && 2>1 | true)

Answer: "Order of precedence". The relevant order of precedence is:

& ^ | && ||

Page 30: Java Certification

Logical OperatorsWith (1>2 && 2>1 | true) the compiler does (what I call) a 'none evaluating pass through the code'* and puts in imaginary brackets like this ((1>2) && (2>1 | true)).

It does this because the compiler knows that the OR '|' keeps 2>1 and the true together. The compiler will then evaluate the first half of the short circuit operator && (i.e. the 1>2) and decides seeing that it is false, that there is no more work to do (see short circuit operators) and drops out of the condition and evaluates the expression in the else block.

However for the expression (1>2 && 2>1 || true) the compiler again does the 'none evaluating pass through the code' puts imaginary brackets like this ((1>2 && 2>1) || true).

This is because the compiler knows that && has a higher binding or precedent (call it what you will). So it again checks the first half of the short circuit operator && (i.e. 1>2) and again decides to short circuit the second half of the &&. But the second half is now only 2>1. It still has to do the or '||', which will make the whole expression true.

Page 31: Java Certification

Summary

Certification Paradox – some people say the Java Certified Programmer Certification is easy. Others say it is one of the hardest industry certifications

My view is that SJCP is not rocket science, but it is difficult and there is a lot of it (that’s what makes it hard). It seems to become easy when you start to learn the basics and learn them well.

There is no substitute for practice and experience

For most people certification is tough but enormously rewarding

Page 32: Java Certification

Any Questions

Wyndham

Ackroyd