2 ms·
In Java, usually an Error like AssertionError is used for those cases. By example, for a switch on an enum, the compiler inserts a "throw new ...Error()" autom
by _old_dude_ 4y ago
In Java, usually an Error like AssertionError is used for those cases.
By example, for a switch on an enum, the compiler inserts a "throw new ...Error()" automatically when the default case is not specified.