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