aspose file tools*
The moose likes Java in General and the fly likes Use of Hash Code in Java apart from Collection Framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Use of Hash Code in Java apart from Collection Framework" Watch "Use of Hash Code in Java apart from Collection Framework" New topic
Author

Use of Hash Code in Java apart from Collection Framework

Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 784

Hi All,

I want to know use of hash code in Java other than Collection Framework.
I googled many websites but they are using collection framework so want to know that any other use of hash code in Java without collection framework.


SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
Ramesh Pramuditha Rathnayake
Ranch Hand

Joined: Oct 31, 2012
Posts: 169
    
    1

Maps are used in Jasper Reporting using java. Normally HashMap. Parameters to the report are send using a Map.


Ramesh-X
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36514
    
  16
The CRC, SHA and similar calculations are similar to hash codes. They are used to confirm the integrity of downloads and to confirm passwords.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13880
    
  10

The hashCode() method in class Object really only exists to support hash-based collections such as HashMap and HashSet.

The hashes that Campbell mentions (CRC, SHA etc.) are not related to the hashCode() method of class Object. Those are cryptographic hash functions, and even though they also have the word "hash" in their name they're used for other purposes and have other requirements than what hashCode() normally is used for.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 784

Thanks Campbell and Jesper
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Use of Hash Code in Java apart from Collection Framework
 
Similar Threads
Fast removal from lists
Doubt About Hash Code
What Is A: Hash Table?
Collection question
Why does Java’s hashCode() in String use 31 as a multiplier?