Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Antonio Petrelli
DYH

2010/9/15 Pankaj D pankaj66...@gmail.com:
 HI if someone can answer this query what is hash code in java ...is it some
 sort of memory location or address ...?

 Regards
 Pankaj


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Pankaj D
What is DYH

On Wed, Sep 15, 2010 at 10:09 PM, Antonio Petrelli 
antonio.petre...@gmail.com wrote:

 DYH

 2010/9/15 Pankaj D pankaj66...@gmail.com:
  HI if someone can answer this query what is hash code in java ...is it
 some
  sort of memory location or address ...?
 
  Regards
  Pankaj
 

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread ramzi khlil
HashCode is a value computed in such way to be unique as possible to improve
performance while retrieving object in HashedCollections.
If for example you have a HashMap, and didn't overrride hashCode() method
all your objects will be in the same bucket resulting a slow execution while
retrieving an object.
But if you do provide an efficient implementation of hashCode() method your
objects will be stored across many buckets and you look up for one of them,
the api does calculate the hashCode of your object and then it selects the
right bucket. After that we go through the bucket to find the needed object.

On Wed, Sep 15, 2010 at 12:35 PM, Pankaj D pankaj66...@gmail.com wrote:

 HI if someone can answer this query what is hash code in java ...is it some
 sort of memory location or address ...?

 Regards
 Pankaj



Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Antonio Petrelli
2010/9/15 Pankaj D pankaj66...@gmail.com:
 What is DYH

Following Chuck's idea...
http://lmgtfy.com/?q=dyh

Antonio

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Laird Nelson
On Wed, Sep 15, 2010 at 12:42 PM, Pankaj D pankaj66...@gmail.com wrote:

 What is DYH


Do Your Homework.

Best,
Laird


Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Pankaj D
Thanks dude  .. .this is what i was looking for 

On Wed, Sep 15, 2010 at 10:13 PM, ramzi khlil ramzi.atv...@gmail.comwrote:

 HashCode is a value computed in such way to be unique as possible to
 improve
 performance while retrieving object in HashedCollections.
 If for example you have a HashMap, and didn't overrride hashCode() method
 all your objects will be in the same bucket resulting a slow execution
 while
 retrieving an object.
 But if you do provide an efficient implementation of hashCode() method your
 objects will be stored across many buckets and you look up for one of them,
 the api does calculate the hashCode of your object and then it selects the
 right bucket. After that we go through the bucket to find the needed
 object.

 On Wed, Sep 15, 2010 at 12:35 PM, Pankaj D pankaj66...@gmail.com wrote:

  HI if someone can answer this query what is hash code in java ...is it
 some
  sort of memory location or address ...?
 
  Regards
  Pankaj
 



Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Leon Rosenberg
On Wed, Sep 15, 2010 at 6:44 PM, Antonio Petrelli
antonio.petre...@gmail.com wrote:
 2010/9/15 Pankaj D pankaj66...@gmail.com:
 What is DYH

 Following Chuck's idea...
 http://lmgtfy.com/?q=dyh


so DYH is Doğan Yayın Holding in Turkey...
:-)

 Antonio

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Mark Thomas
On 15/09/2010 17:44, Antonio Petrelli wrote:
 2010/9/15 Pankaj D pankaj66...@gmail.com:
 What is DYH
 
 Following Chuck's idea...
 http://lmgtfy.com/?q=dyh

And while you are at it, I'd read these too:
http://catb.org/~esr/faqs/smart-questions.html
http://slash7.com/2006/12/22/vampires/

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: [OT] Hi Guys ... can some one tell what is hashcode in java

2010-09-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ramzi,

On 9/15/2010 12:43 PM, ramzi khlil wrote:
 HashCode is a value computed in such way to be unique as possible to improve
 performance while retrieving object in HashedCollections.

What are HashedCollections?

 If for example you have a HashMap, and didn't overrride hashCode() method
 all your objects will be in the same bucket resulting a slow execution while
 retrieving an object.

Wow. That is so wrong.

 But if you do provide an efficient implementation of hashCode() method your
 objects will be stored across many buckets

This is also not correct.

 and you look up for one of them,
 the api does calculate the hashCode of your object and then it selects the
 right bucket.

Actually, it calls the hashCode method on the object that requires it.
The API performs no calculations. (Technically speaking, the API doesn't
do anything but exist, but let's not pick nits).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyRQ78ACgkQ9CaO5/Lv0PDpkACcDvP2LPw13oXupFptDFRikrDm
YNEAn39YX7/mkXsAu/fOSWsAETNYxAsZ
=igRA
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org