Typically this is done by using a Scanner that wraps the System.in InputStream.



Scanner in = new Scanner(System.in);
System.out.println("Please enter something:");
String something =...