Joke Collection Website - Public benefit messages - Differences between Java string newlines "\n", "r" and "\r\n"
Differences between Java string newlines "\n", "r" and "\r\n"
\n
Represents the new
Line, that is, newline character
2.
\r
Representative carriage
Return means to go back to the beginning of the line without moving to the next line.
3.
\r\n
Enter a new line, that is, go back to the beginning of the line and change a line.
It has different meanings in different systems.
Meaning in windows:
\n '
Line feed to the next line at the current position without returning to the beginning of the line;
\r
It means to go back to the beginning of a line without moving to the next line.
Meaning in linux:
\n Enter+ line feed operation will be performed.
\r
The carriage return character will only be displayed as the control character ("M"), and the carriage return operation will not occur.
Finally, in the system, it means carriage return and line feed.
- Related articles
- The SMS reminds me that my store has generated orders, but the store is not perfect yet. Causing buyers to be unable to trade. What do you mean? Also let qq solve it.
- I want to send text messages to teachers, friends and relatives on New Year's Eve.
- A simple sentence in the new home relocation greeting.
- Does Huawei charge for continuous calls?
- HTC and 328D telecom customized version, mobile card for dual card and second card. Now the mobile card can't intercept harassing messages.
- What does it mean to publicize the overdue online loan?
- How does Apple's mobile phone view the source code of web pages?
- How to retrieve the previous SMS after Apple's mobile phone is restored?
- Almost got scammed (2)
- Nokia has just finished the phone, but it always receives short messages from the so-called system. The icon is a planet, which is initially judged to be a virus.