You are viewing a single comment's thread. Return to all comments →
Would it be better to do the following instead of the containsKey() and get() calls?
Integer count = magMap.get(s); if (count==null) { magMap.put(s,1); } else { magMap.put(s,count+1); }
Seems like cookies are disabled on this browser, please enable them to open this website
Hash Tables: Ransom Note
You are viewing a single comment's thread. Return to all comments →
Would it be better to do the following instead of the containsKey() and get() calls?