This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Real test !

 
Aarti Joshi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,
In the examulator
exam , EACH multiple answer question has given the number of correct answers.
Will it be same in the real exam?
Will the interface be same in real exam too ?
-- cheers
Aarti
[ May 01, 2003: Message edited by: Aarti Joshi ]
 
Lawrence Chettiar
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Yes in the real exam you will provided with the no of choices,
Well thats what I heard from the people who took the exam.
I will be taking in 2 weeks time
Lawrence
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, though on examulator you can opt not to have the number of options shown just to make it a bit more difficult. The interface attempts to mimick the real exam. The real exam has questions with "radio" buttons and some "fill in the blank" quesitons, but generally it is quite similar.
Marcus
 
Aarti Joshi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi lawrence,
They DO tell the number of correct answers.
Just took the exam..got 91%...
-- cheers
Aarti
 
Robbie kyodo
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arthi

Congrats ! just want to find out from you, how much does the exam covers Collection ?
It seems that from K&B book, all you have to know is which interfaces are ordered, sorted, FIFO, ....etc.
Is it true ? or there extensive codes to analyst ?
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy... just wanted to say, as the "K" part of "K & B", you definitely will NOT have extensive collection code to analyze. Just make sure you know what iterator code looks like.
The objectives ask ONLY that you "make appropriate selections..." based on the specified requirements (like, "You need a class that guarantees every name is unique, and you also need...")
You won't be able to choose a suitable collection unless you know it's fundamental behavior (allow duplicates? Use keys? Ordered?, etc.).
But really, that's it. The only other objective involving collections is the one about hashCode and equals, and that doesn't even necessarily belong in the Collections objective, and most hashCode and equals questions will not involve Collections.
So here's what you definitely do NOT have to know:
-the specific algorithms used by ANY of the collections, or the O-notation, etc.
-the method signatures for all the methods in the collections interfaces and classes. If you know the basic methods you're OK, and most of *those* you can infer IF you know the way the various Collections behave. For example, you won't have an iterator() method in a HashMap, because you can't iterate over a map, only over the VALUES in the set. So it wouldn't make sense to see code using the iterator method directly on a reference to a HashMap. And you would not, for example, expect to see a method in ArrayList that lets you add something with two objects as the arguments (like you would with a HashMap). You'd probably expect to see one that takes an int (for the index) along with the object to add, but not one with two objects. So even if I had never laid eyes on the API for either of those classes, if I understood how they worked, I could figure out whether those methods made sense. I guess I'm saying that you do NOT have to memorize the API for these classes, for the exam. But I would spend a fair amount of time getting clear about the difference between Set, Map, and List, and knowing which implementation classes fall under each of those, and of course, the difference between sorted, ordered, etc.
Cheers,
Kathy
(think of me as a stress-reduction therapist... I consider it my job to tell you when you can just relax. You have enough to study as it is )
 
Robbie kyodo
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Kathy

I was confused because of reading too many SCJP books and have taken many mock questions that asked you everything from all over the sky.
Many of the mock questions that I took from the web asked deep into the API of collection interfaces.
I have used ArrayList, Vector and Hashtable regularly but not the others. I just need to buck-up on the rest.
Thanks !
 
Preszio let
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I encounter one question in examulator on collection :
One of the answer was : ArrayList contains a method call get(index) that retrieve......

Somehow, I agree with Robbie on this. I get confused too everytime a mock shows 'inconsistency'
 
Giselle Dazzi
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you won't have an iterator() method in a HashMap, because you can't iterate over a map, only over the VALUES in the set.

I didnt quite understand what Kathy said. Why cant you iterate over a map? The example in the book Im reading shows an iterator being used over a TreeMap, so I got confused...
thx
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Giselle, in your TreeMap example, how is the reference to the Iterator object assigned? Is there a declaration such as Iterator it = ...
 
Giselle Dazzi
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here goes the method:

 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iterator iter = map.keySet().iterator();
map.keySet() returns a reference to a Set object (an object that implements the Set interface). The Set object has a *view* of all the keys in the TreeMap object.
The iterator() method of the Set object gives you a reference to an Iterator object, which you assigned to the variable iter. The iterator walks through the Set object.

I am not sure I have explained this very clearly. If you do not understand, it is my fault. (Maybe Corey will drop in - hint, hint - and give one of his very lucid explanations.)
[ May 07, 2003: Message edited by: Marlene Miller ]
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SCJP candidates -
Kathy and I have been kicking around an idea for a thread or a contest, something along the lines of -
"Top Ten Topics that Everyone Thinks are on the SCJP Exam, but Aren't "
Does this sound useful to anyone?
-Bert
 
Ravi Anamalay
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes - might dispel some of the urban legends that have cropped up around the SCJP exam !
 
Giselle Dazzi
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Marlene, your explanation was great.
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Giselle.
Why can�t you iterate over a map?

The answer that avoids the question is � you iterate over the set of keys or the set of entries, which are views of the map.
That answer does not explain why the Map interface does not provide an Iterator object.
Watch this site: answers
[ May 10, 2003: Message edited by: Marlene Miller ]
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More on why you can't iterate through maps:
Giselle, take a look at the link I provided above. Their point of view and the link to the Collections design facts are very helpful.
 
Giselle Dazzi
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, I will thx again !
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Aarti Joshi:
Hi all ,
In the examulator
exam , EACH multiple answer question has given the number of correct answers.
Will it be same in the real exam?
Will the interface be same in real exam too ?

Aarti, you may have noticed (when you took the real exam) that not only we are told the number of right answers to pick but the interface even prevents us from picking more right answers than asked. I mean, if a question says "pick two", interface doesn't allow us to pick more than two. I thought that was neat (instead of allowing us to pick more and marking the whole answer wrong!).
 
Preszio let
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marlene
the answer link does not work. Any other link ?
 
Marlene Miller
Ranch Hand
Posts: 1392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prezio, thank you for letting me know something is wrong with the link. I fixed it.
Also, here is the link:
http://forum.java.sun.com/thread.jsp?forum=31&thread=396465
Or you can go the http://forum.java.sun.com
Select: General - Java Programming
Search forum: Why can't you iterate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic