aspose file tools*
The moose likes Beginning Java and the fly likes Hash Map Values Compare with String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Hash Map Values Compare with String" Watch "Hash Map Values Compare with String" New topic
Author

Hash Map Values Compare with String

R Karthick
Greenhorn

Joined: Feb 11, 2008
Posts: 11
Hi I just want to compare the hash map value with a string. but it is not working for me. Please Help



It is always going to the else loop. i dont know why!

While Printing those values
Sysout((String) map.get("ID")); gives CHECKED
Sysout(temp); gives CHECKED


Kindly solve my problem.
Thanks.
Peter Lawrey
Ranch Hand

Joined: Dec 21, 2008
Posts: 62
cross-post
http://forums.sun.com/thread.jspa?threadID=5357514&messageID=10557012
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19538
    
  16

Please Be Forthright When Cross Posting To Other Sites.

And like on in that link, once I fix the small compiler errors (especially the missing ) in the if) and replace Sysout with System.out.println, it prints True for me.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hash Map Values Compare with String
 
Similar Threads
Alternate way of inserting the values in map?
Concatenating string texts based of key value
Storing a count in a || array
hash map
how to store multiple values in one key in hash table