Java input from console

You can try using this code: Scanner in = new Scanner(System.in); char firstChar = in.nextLine().charAt(0); for a String, and you can use this code for ints: Scanner in = new Scanner(System.in); int firstNumber = in.nextInt();