zmila: (3kub)
[personal profile] zmila
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/view_bug.do?bug_id=1223179
- It is implemented in Java SE 7 as a new feature
From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

Profile

zmila: (Default)
zmi la

December 2016

S M T W T F S
    123
45678910
11121314151617
181920212223 24
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 23rd, 2017 08:37 pm
Powered by Dreamwidth Studios