| 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: 2896
|
|
|
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26218
|
|
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: 2896
|
|
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
|
 |
 |
|
|
subject: how to compare two Hashmap contents.
|
|
|