void (String... commands) { loopLabel: for (String command : commands) { switch<caret> (command) { case "Say hello": System.out.printf("Hello, %s!%n", System.getProperty("user.name")); break; case "Exit": System.out.println("Goodbye."); break loopLabel; default: System.out.println(command); break; } } }