aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Sun's New Sample 1.4  Exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Sun Watch "Sun New topic
Author

Sun's New Sample 1.4 Exam

Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
In the 1.4 sample exam there's a question about ArrayList.
In the review (I got it wrong )it says:

It's not well-suited for random access; use the RandomAccess class instead.

RandomAccess is an interface not a class.
So it should be "use a class that implements the RandomAccess interface instead"
-Barry
[ October 15, 2002: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
What's weird is that ArrayList DOES actually implement the RandomAccess interface and should thus be well-suited for random access, shouldn't it? The other class implementing random access is Vector.


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Way to go Valentin! I want my money back!!!
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Moving this to the Prog Cert forum... just to see if somebody else experienced the problem...
Kathy?
Kathy Sierra
Cowgirl and Author
Ranch Hand

Joined: Oct 10, 2002
Posts: 1572
Wellll... that question couldn't be more messed up. (Can't take credit for that one though). It's being changed to the following:
QUESTION SHOULD SAY: "Which THREE are true..."

Currently it says correct answers are A and C
SHOULD BE: correct answers are A, C, and E
New explanation SHOULD BE:
============================
Options A, C, and E are the correct answers. The Set interface does not permit duplicate elements, but since ArrayList implements List and not Set, it can hold duplicates. Its methods are not synchronized, so it's not thread-safe on its own. List classes use a ListIterator rather than a simple Iterator, because a ListIterator lets you traverse bi-directionally. It is well-suited for fast random access, and implements the RandomAccess interface. It also implements java.util.Collection (not Collections with an 's').
============================
We don't know what happened to that one, but in any case, it's been submitted to be fixed.
Thanks!
-Kathy
responsible for only the questions that are absolutely perfect, correct, cogent, and interesting


Co-Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0596007124/ref=jranch-20" target="_blank" rel="nofollow">"Head First Design Patterns"</a><br /> <br />Just a Jini girl living in a J2EE world.
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
Ok, Thanks Kathy.
So I guess this topic is now clear, right Barry?
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Wow I got 100%!!!
Now I only have to get 100% on the other 61 - 10
questions...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Sun's New Sample 1.4 Exam
 
Similar Threads
two ways of looping into a list
Tools required for Exam
Null Interface
Errata for Kathy's Book?
Why Serializable doesnot have any method