Java Java Basics Getting Started with Java Strings, Variables, and Formatting

Amit Bhattacharya
Amit Bhattacharya
825 Points

To print anything we use System.out.println in java but why console is used here?

Console is used in C++ as I know then why in java it is used. It should be System.out.println

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Amit";
Console.printf(firstName);