[Java Learning note]java The escape character of the basic overview of the language &break&continue

Source: Internet
Author: User

1. Escape character

\ t: Tab

\ n: Enter

\b: Backspace

\ r: Enter

\ ": Double quotation marks

\ \: Backslash (commonly used in the writing of file paths)

The carriage return character in Windows system is actually composed of two symbols, \ r \ n

The return character in the Linux system is \ n

2.break&continue

Break (Jump) statement: The application scope is the selection structure (switch statement) and the loop structure

continue (continuation) statement: Apply to Loop structure

Attention:

    1. It makes no sense for these two statements to leave the scope of the application, and the compilation will error.
    2. These two statements exist individually and cannot have statements, because they cannot be executed. General use if judgment.
    3. The continue statement is to end the loop and go to the next loop.
    4. The appearance of the designator allows the scopes specified by the two statements to be scoped.
    5. The break statement is the selection or loop structure in which to jump out.

Jump out of the outer loop with the label (with continue):

A:for (int i = 0; i<3:i++) {//A is the label of the outer loop    B: for (int j = 0; J <3; J + +) {
        System.out.println ("Hello World");         // Break ; // default bounce inside loop         Break A; // jump out of the outer loop     }}

[Java Learning note]java The escape character of the basic overview of the language &break&continue

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.