public static void main(String[] args) {
System.out.println("Input filename: ");
Scanner sc = new Scanner(System.in);
String input = sc.nextLine();
while (input.length() == 0){
System.out.println("Please enter names: ");
String names = sc.nextLine();
}
}
How do I make the program end when no more NAMES are entered?