This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes hello ranchers, how do I use Map.SimpleEntry to store and return Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "hello ranchers, how do I use Map.SimpleEntry to store and return" Watch "hello ranchers, how do I use Map.SimpleEntry to store and return" New topic
Author

hello ranchers, how do I use Map.SimpleEntry to store and return

ravisankar sankar
Greenhorn

Joined: Jul 22, 2011
Posts: 29



Please tell me how can I store and Iterate this map
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14278
    
  21

Where exactly does class SimpleEntry come from? It's not a class from the standard Java API.

What exactly do you want to do? Store 'map' into 'mapiRamAsset' under a specific key? You'd have to create a SimpleEntry to use as the key first. I can't tell you how to do that, because I don't know what class SimpleEntry is. Then you use 'put' to store the map:


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
ravisankar sankar
Greenhorn

Joined: Jul 22, 2011
Posts: 29



http://docs.oracle.com/javase/7/docs/api/java/util/AbstractMap.SimpleEntry.html

Yes , I want to Store 'map' into 'mapiRamAsset' under a specific key, how do I create key and pass to simpleEntry? how to Iterate the mapiRamAsset
Please help
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
Don't use that implementation. Use the Interface Map.Entry<K, V> instead.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hello ranchers, how do I use Map.SimpleEntry to store and return