diff --git a/Others/countwords.java b/Others/countwords.java index 30806e13..a72ef9c9 100644 --- a/Others/countwords.java +++ b/Others/countwords.java @@ -18,7 +18,7 @@ import java.util.Scanner; input.close(); } - public static int wordCount(String s){ + private static int wordCount(String s){ if(s.isEmpty() || s == null) return -1; return s.trim().split("[\\s]+").length; }