From 2638ce639608aa84bb087ea42c37905c63fed548 Mon Sep 17 00:00:00 2001 From: Prasoon Date: Wed, 31 Jan 2018 15:59:28 +0530 Subject: [PATCH] Set method to private --- Others/countwords.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }