aspose file tools*
The moose likes JDBC and the fly likes how to compare two Hashmap contents. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to compare two Hashmap contents." Watch "how to compare two Hashmap contents." New topic
Author

how to compare two Hashmap contents.

Rupa Katkar
Ranch Hand

Joined: Aug 12, 2009
Posts: 35
Hi,

I have created two hashmaps, it contains database table .
Now i want to compare values of both .
how should i compare it.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Just get the key and find out whether both the maps has same value object or different.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30973
    
159

Rupa Katkar wrote:I have created two hashmaps, it contains database table .

What type of object is in the HashMap? A database table isn't a Java type, so it must be something else.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rupa Katkar
Ranch Hand

Joined: Aug 12, 2009
Posts: 35
Jeanne Boyarsky wrote:
Rupa Katkar wrote:I have created two hashmaps, it contains database table .

What type of object is in the HashMap? A database table isn't a Java type, so it must be something else.


Hi,

Hashmap contains contents of database table.

Actually i solved that problem of comparison, another new problem i am having
it is
..
After making the comparison of two hashmap, i got some results.
For eg. difference between two amount. Now i want to transfer this result to
jsp page for displaying purpose, how should i do this.
Pl. tell me.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Rupa Katkar wrote: After making the comparison of two hashmap, i got some results.
For eg. difference between two amount. Now i want to transfer this result to
jsp page for displaying purpose, how should i do this.
Pl. tell me.

JPS things should be asked in JSP section, still here is the quick answer:

1. Put the values you want to display on JSP page in request scope.
2. Access them using the EL, JSTL, but never using scriptlet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to compare two Hashmap contents.