Dear Pacior: Sorry but this was not a coherent explanation. As far as I know there is a key and a value coordinated to it. In our example we have "1st" as the key and then the name, "Shin" as the value. Can I ask you to please clarify your example as I am a beginner and just learning. Thank.
Respects, JKid314159 http://existentialists.blogspot.com/ --- On Wed, 8/12/09, pacior <[email protected]> wrote: From: pacior <[email protected]> Subject: [java programming] Re: Lab1016.3.2 To: "Free Java Programming Online Training Course By Sang Shin" <[email protected]> Date: Wednesday, August 12, 2009, 7:42 PM You get an integer object, which is a value of Your Map. String is always a Key in this example. m.get each time returns value. The smart way of counting numers of strings is dynamically changing the value of key. Regards Pacior On Aug 13, 2:55 am, JKid314159 <[email protected]> wrote: > Integer freq = (Integer) m.get(name[i]); > //m.get(name[i]); returns a string object which is cast to an Integer object. > Not too sure what is going on here. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
