There are few ways to read input string from your console/keyboard. The following smaple code shows how to read a string from the console/keyboard by using Java. public class ConsoleReadingDemo { public static void main(String[] args) { // ==== BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); System.out.print("Please enter user name : "); String username = null; try { username = reader.readLine(); } catch (IOException e) { e.printStackTrace(); } ...
About Java and it's related concepts..