Switch on Enum in Java

Why can’t you switch on an enum in Java? It seems simple enough to do and would make for some convenient code. Also this question could apply to String‘s. You can switch on a char, but not a String …?

Leave a Comment