提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
| Escape sequence | Description |
|---|---|
| \n | Newline. |
| \t | Horizontal tab. |
| \r | Carriage return. |
| \\ | Backslash. |
| \" | Double quote. System.out.println("\"in quotes\""); displays "in quotes". |
public class Main {//from n o w j a v a . c o m - 时 代 Java // main method begins execution of Java application public static void main(String[] args) { System.out.println("Welcome\nto\nJava\nProgramming!"); } }