mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 01:35:16 +08:00
Set method to private
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user