You are viewing a single comment's thread. Return to all comments →
Single line using Java8 Streams:
System.out.println(s.chars().filter(c -> Character.isUpperCase((char)c)).count()+1);
Seems like cookies are disabled on this browser, please enable them to open this website
CamelCase
You are viewing a single comment's thread. Return to all comments →
Single line using Java8 Streams: