• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sun's New Sample 1.4 Exam

 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Way to go Valentin! I want my money back!!!
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Prog Cert forum... just to see if somebody else experienced the problem...
Kathy?
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, Thanks Kathy.
So I guess this topic is now clear, right Barry?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow I got 100%!!!
Now I only have to get 100% on the other 61 - 10
questions...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic