Java Tutorial · Chapter 4 of 12
Java Output
Print with System.out.
System.out.println prints text and moves to the next line.
System.out.print prints without automatically adding a new line.
Output sample
Try it Yourself »
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
System.out.println("CoderKiosk Java Lab");
}
}
Classroom Tips
- Use quotes for text.
- Concatenate with + when mixing text and variables.