receive an int from terminal java code example Example: receive an int from terminal java Scanner myInput = new Scanner( System.in );