Escape characters in Java

Source: Internet
Author: User
Tags control characters

Escape character How Unicode is represented function explanation
\b \u0008 Backspace
\ n \u000a Line break
\ r \u000d Carriage return (can be wrapped)
\ t \u0009 Space character
\" \u0022 Double quotes
\‘ \u0027 Single quotation marks
\\ \u005c Reverse Slash

Line breaks have different forms under different systems:
Text file line break under \n:mac OS
Text file line break under \r:unix
Text file line break under \r\n:windows

Divide by Type:

1. Eight binary escape sequence: \ + 1 to 3 bit 5 digits; Range ' \000 ' ~ ' \377 '
: null character
2.Unicode Escape Character: \u + four hexadecimal digits; 0~65535
\u0000: null character
3. Special characters: 3
\ ": Double quotation marks
\ ': Single quote
\ \: Backslash
4. Control characters: 5
\ ' Single quote character
\ \ backslash Character
\ r Enter
\ nthe line break
\f Paper Change page
\ t transverse jump lattice
\b Backspace

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.