The switch in Java jre7 and later versions supports the implementation details of String, jre7switchThe switch in Java 7 supports String implementation details.
Author: zsxwing updated: 21:08:02 release: 13:58:19
Before Java 7, the switch can only
Switch syntax The code is as follows:Copy code Switch (expression){Case constant expression 1: Statement 1;....Case constant expression 2: Statement 2;Default: statement;} Default is to execute it if there is no matching case. default is not
The switch in JAVA7 supports the implementation details of stringAuthor: zsxwing Updated: 2013-03-04 21:08:02 posted: 2012-04-26 13:58:19Before JAVA7, switch can only support byte, short, char, int, or its corresponding wrapper class and enum
http://m.blog.csdn.net/blog/tianyazaiheruan/8988420Today qnovations teacher in the use of switch, this design to the most basic content, may forget some of its basic grammar, there are some errors, so impromptu from a variety of data query summed up
The switch can only compare values or characters, but do not think that it is not useful if so. If appropriate, it is more efficient than if Else. The syntax structure of the switch is as follows:
Switch (variable name or expression ){
Case must
Case four custom switches:
Function Introduction: The function of this case is to create a custom switch, you can decide the background of the switch. When the slide switch, the slider of the switch can follow the finger to move. When the finger is
Java is very attractive, but for beginners who have just entered the Java threshold, compiling and running a very simple Java program is simply a nightmare. Clearly, the program is correct, but all kinds of confusing error messages really make you
The basic type, or built-in type, is a special type different from the class in Java. They are the most frequently used types in programming, so they are always indispensable in the interview questions, in this article, we will review the knowledge
A switch statement consists of a control expression and multiple case labels.The types supported by the switch control expressions are byte, short, char, int, enum (Java 5), String (Java 7).The Switch-case statement can be fully interoperable with
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.