You are viewing a single comment's thread. Return to all comments →
In java 8 addition to the hashmap could be writen a bit shorter:
for(int i=1;i<=data[1].length();i++) { map.merge(name.substring(0, i), 1, Integer::sum); }
Seems like cookies are disabled on this browser, please enable them to open this website
Contacts
You are viewing a single comment's thread. Return to all comments →
In java 8 addition to the hashmap could be writen a bit shorter: