File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Section 9.2 - Beta 1.4 SCJP objectives Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Section 9.2 - Beta 1.4 SCJP objectives" Watch "Section 9.2 - Beta 1.4 SCJP objectives" New topic
Author

Section 9.2 - Beta 1.4 SCJP objectives

Toby Davis
Ranch Hand

Joined: Apr 09, 2002
Posts: 65
I'm taking the 1.4 Beta next month... and wanted a bit of clarification on Section 9.2 in the testing objectives: "Distinguish between correct and incorrect implementations of the hashcode methods."
I know this is a beta test and early (no study guides for this yet), but can someone guess/theorize what this means?
Originally, I took this to mean that you had to understand the differences in use of hashtable, hashmap and hashset and the appropriate circumstances to use them. (Hashmap/Hashtable fall under the Map implementation, differences are sychronization/non-null for ht, etc. HashSet under the Set interface for element-only based collection allowing a set to have a non-duplicated null element, etc etc.)
Or do we take it literally in that we have to understand/memorize methods of the hash classes?
I guess we'll have to wait to "test the test" to find out.
--
[ April 18, 2002: Message edited by: Toby Davis ]

SCJP2 (1.4)
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

I take it to mean Object.hashCode().
Joshua Bloch's book "Effective Java Programming Language Guide" discusses how to correctly implement hashCode.
Toby Davis
Ranch Hand

Joined: Apr 09, 2002
Posts: 65
I found a related, older thread on this:
http://www.coderanch.com/t/368118/java/java/Problems-HashSet-fixed-TreeSet
The author you mentioned gives a link to a free chapter that talks about overriding the hashcode() and equals() methods.
Thanks for the initial pointer.
[ April 18, 2002: Message edited by: Toby Davis ]
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

A greenhorn who knows how to Search!! If I could, I'd promote you to ranch hand just for that...
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

a bit off-topic... but I saw Joshua Bloch speak at JavaOne -- two of the best sessions I went to. Just for that I'm going to buy his book. If you knew everything in his effective Java book -- you'd be an amazing programmer.
Rob Ross
Bartender

Joined: Jan 07, 2002
Posts: 2205
Hey Jessica, I was there too! I agree, his conference was fantastic.
You can actually download the slides from his presentation at JavaOne from sun's site. You have to register first, but there's no fee.
Here's the link to the slides:
Effective Java Slides


Rob
SCJP 1.4
Toby Davis
Ranch Hand

Joined: Apr 09, 2002
Posts: 65
Originally posted by Junilu Lacar:
A greenhorn who knows how to Search!! If I could, I'd promote you to ranch hand just for that...

One of the sites I run also uses UBB.
I don't have the funds to purchase any books right now (already have RHE, Exam Cram, and several other trusty Java reference books I've used at my jobs in past years)...
Are there any other online resources that get into hashcode() implementations? The keyword is free. (That book chapter did help, though)
---
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

Are there any other online resources that get into hashcode() implementations?
:roll: I knew it was too good to be true... check out
this JavaWorld article
Toby Davis
Ranch Hand

Joined: Apr 09, 2002
Posts: 65
I think I have enough ammo to work on this objective. Thanks for the fast replies.
 
wood burning stoves
 
subject: Section 9.2 - Beta 1.4 SCJP objectives
 
Similar Threads
APIs for std classes??
differenciate 'heap' and 'stack'
hashCode() and equals()
collections
Hashset, Hashtable and Hashmap