// Java program to demonstrate working of System.console() // Note that this program does not work on IDEs as // System.console() may require console public class Sample { public static void main(String[] args) { // Using Console to input data from user String name = System.console().readLine(); System.out.println("You entered string " + name); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)