Java Development Manual The 4th chapter of the learning Process Control process statements

Source: Internet
Author: User

In the multiple selection:switch Statement , a in switch (a) can be either a base type expression or an enumeration type expression. The expression followed by the case also satisfies the following conditions:

  • Compatible with an expression of a
  • It should be a variable that cannot have a variable (that is, only the literal or final)
  • Can't have two identical case

Also, be aware of the basic execution flow of the switch statement: switch matches the value of the expression to the value of the expression following the case, and if a match is found, then the case is executed, and if no match is made to the corresponding case, the default is encountered. Executes from default until the break statement is encountered or the entire switch statement ends.

Java Development Manual The 4th chapter of the learning Process Control process statements

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.