Dear Java Programmer:
// Initialize frequency table with testing data
for (int i=0; i<name.length; i++) {
------------------------------------------------------------------------
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.
------------------------------------------------------------------------------------
// Adding an entry to the TreeMap
m.put(name[i], (freq==null ? ONE :
new Integer(freq.intValue() + 1)));
}
------------------------------------------------------------------------------------
Is autoboxing going on here?
Please comment. Thank you.
Respects,
JKid314159
http://existentialists.blogspot.com/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---