java print line to console code example
Example 1: How to print in console java
public class ConsoleTest {
public static void main(String[] args) {
System.out.println("Console is: " + System.console());
}
}
Example 2: how to print to the console in java
System.out.println("Text");