Output
Output
class AssignmentOperator {
public static void main(String[] args) {
System.out.println("Java programming is interesting.");
}
}
You can simply use System.out.println(), System.out.print() or System.out.printf() to send output to standard output (screen).
Difference between println(), print() and printf(): print() - prints string inside the quotes; println() - prints string inside the quotes similar like print() method, then the cursor moves to the beginning of the next line; printf() - it provides string formatting (similar to printf in C/C++ programming).