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

Date: 2015-03-05 11:30 am (UTC)
From: [identity profile] vp.livejournal.com
Эээ, ну свич потому что изначально работал по перечислениям/детерминированным наборам.

Date: 2015-03-15 04:36 am (UTC)
From: [identity profile] ru-ua-by.livejournal.com
зашла почитать...

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 Sep. 22nd, 2017 06:09 am
Powered by Dreamwidth Studios