console output in java code example
Example 1: console log java
System.out.println(String msg)
Example 2: 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 3: java text ouput to console
System.out.println("Hello world!");
Example 4: console printing in java
public class writingInTheConsole {
public static void main(String[] args) {
System.out.println("Hello Java! I made Minecraft: Java Edition!");
}
}
Example 5: java taking console input
String str = System.console().readLine();
Example 6: How to print in console java
public class ConsoleTest {
public static void main(String[] args) {
System.out.println("Console is: " + System.console());
}
}