string cannot be null in switch

Run Settings
LanguageJava
Language Version
Run Command
// It is surprised that Java does not allow null value in switch statement, where most of other languages do. class Main { public static void main(String[] args) { String x = null; switch (x) { default: break; } System.out.println("It shall not pass"); } }
Editor Settings
Theme
Key bindings
Full width
Lines