In Java SE 7 and later, you can use a String object in the switch statement's expression.
опанькі :) "а мужыкі та ня ў курсе"
Why can't I switch on a String?
Is this functionality going to be put into a later Java version?
Can someone point me to an article, or themselves explain why I can't do this, as in, the technical way Java's switch statement works?
і адказы:- It's in SE 7. 16 yrs after it's request.
- Sun was honest in their evaluation: "Don't hold your breath." lol, http://bugs.sun.com/bugdatabase/
- It is implemented in Java SE 7 as a new feature