void (String name) { switch (name) { case "A" -> { System.out.println("A"); break; // reports 'break' statement is unnecessary } default -> { System.out.println("Default"); break/**/; // reports 'break' statement is unnecessary } } }