Java examples for Language Basics:Hello World
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 { // main method begins execution of Java application public static void main(String[] args) {/*w w w . j a v a2s .c o m*/ System.out.println("Welcome\nto\nJava\nProgramming!"); } }