We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 206b9aa commit 2638ce6Copy full SHA for 2638ce6
Others/countwords.java
@@ -18,7 +18,7 @@ public static void main(String[] args){
18
input.close();
19
}
20
21
- public static int wordCount(String s){
+ private static int wordCount(String s){
22
if(s.isEmpty() || s == null) return -1;
23
return s.trim().split("[\\s]+").length;
24
0 commit comments