Communities for your favorite technologies. Explore all Collectives
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Why can't I switch on a String?
String
Is this functionality going to be put into a later Java version?
Can someone explain why I can't do this, as in, the technical way Java's switch statement works?
switch
Why can't I switch on a StringString?
Can someone point me to an article, or themselves explain whywhy I can't do this, as in, the technical way Java's switchswitch statement works?
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?
Why can't I switch on a String in Java?