старэю, пара на свалку
Mar. 5th, 2015 02:25 pmIn 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/view_bug.do?bug_id=1223179
- It is implemented in Java SE 7 as a new feature