java print in console code example
Example 1: how to print to console in java
System.out.println("Hello World!");
System.out.print("Hello World");
int a = 1;
System.out.println(a);
Example 2: console printing in java
public class writingInTheConsole {
public static void main(String[] args) {
System.out.println("Hello Java! I made Minecraft: Java Edition!");
}
}
Example 3: How to print in console java
public class ConsoleTest {
public static void main(String[] args) {
System.out.println("Console is: " + System.console());
}
}
Example 4: how to print to the console in java
System.out.println("Text");