• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to compare two Hashmap contents.

 
Rupa Katkar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just get the key and find out whether both the maps has same value object or different.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34656
366
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Rupa Katkar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic