You are viewing a single comment's thread. Return to all comments →
Excellent example of Java 8.
The curly braces in the expression body are optional if the body contains only one statement.
That gives us:
one.chars().forEach(c -> letters[c-'a']++); two.chars().forEach(c -> letters[c-'a']--);
Seems like cookies are disabled on this browser, please enable them to open this website
Strings: Making Anagrams
You are viewing a single comment's thread. Return to all comments →
Excellent example of Java 8.
The curly braces in the expression body are optional if the body contains only one statement.
That gives us: