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
Java programming those things 34 -- switch statement syntax Zhengzhou game college Chen yuefeng from: http://blog.csdn.net/mailbomb
5.3.2 switch statementThe Chinese meaning of the switch keyword is the meaning of switch and conversion. The switch
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.
Switch statement
This statement asks for the value of an expression and compares that value to many of the case. Each case is associated with a statement list called a switch block. C # executes a block of statements associated with a switch block
Programming | control | Statement SIXTH Chapter CONTROL statement
There is a statement that you can find in each programming language control flow statement. In this chapter, I introduce C # 's control statements, which are divided into two main
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
There are 32 keywords in the ANSI C standard C language, namely:Auto break case Char const continue default does double else enum externfloat for goto if int long register return short SIG Ned sizeof static struct Switchtypedef Union unsigned void
casts of data types
public class example2{
int i=97;
Char c= (char) i; Cast of type
System.out.println ("c=" +c);
}
Hundred Record Entry dialog box
Import javax.swing.joptionpane;//dialog box to eject the method in the required package
public class
Switch-case retrun break, switch-caseretrun
{
If statements process two branches, the if-else-if structure must be used when processing multiple branches. However, if there are many branches, the more nested if statement layers, the program is not
Control | Statement > Sixth Chapter control statement (Rainbow translation)
Source: http://www.informit.com/matter/ser0000002
Body:
Sixth Chapter Control Statements
There is a statement that you can find in each programming language control flow
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.