Objective
Process Control statement:
In the process of executing a program, the order of execution of each statement has a direct effect on the result of the program. That is to say, the process of the program has a direct impact on the running
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
Multi-Select structure switch statement
In Java, a switch statement is specifically provided for the multipath branching selection process, and the switch statement chooses one of the multiple operations to run based on the value of one expression.
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
Synchronize the original text to http://www.waylau.com/java-switch-use-string/ When I try to use the string parameter in a switch statement (note ctrType as a string) switch (ctrType) { case "01" : exceptionType = "读FC参数数据";
------java training, Android training, iOS training,. NET training , look forward to communicating with you! -------1: operator (master)(1) Arithmetic operatorsa:+,-, *,/,%,++,--Note: Integers can only be divided into integers, and if you want
In one of the problems encountered in the switch, because of the switch execution sequence of the lack of understanding, here is a simple way to understand the byte code of the Switch execution order (the topic is as follows): Public classag{Static
PackageCom.swift; Public classSwitch_test { Public Static voidMain (string[] args) {/** Can the switch statement function on a byte, can it function on a long, or can it be on a string? */ byteZijie = 3; System.out.println (Zijie);
Synchronize the original text to http://www.waylau.com/java-switch-use-string/When I try to use the string parameter in a switch statement (note ctrType as a string) switch (ctrType) { case "01" : exceptionType = "读FC参数数据";
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 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.