system.out.println in java shortcut code example

Example 1: system.out.println shortcut

// Shortcut on Netbeans. Type sout and press Tab key.
// Shortcut on Eclipse. Type syso and press Ctrl+space.
// Shortcut on JDeveloper. Type sop and press Ctrl+Enter.
// Shortcut on Intellij IDEA Type sout and press Tab key

Example 2: java system.out.println shortcut

--eclipse syso: ctrl+Space
--intelij sysout: ctrl+space

Example 3: java system.out.println

System.out.print(<string>); //prints in the same line as the previous print
System.out.println(<string>); //prints in a new line

// Example
System.out.print("This ");
System.out.print("will ");
System.out.print("be ");
System.out.print("all ");
System.out.print("in ");
System.out.print("one ");
System.out.print("line.");

System.out.println("Hello World!");
System.out.println("second line");

Tags:

Java Example