scanner java oracle code example Example: scanner java Scanner sc = new Scanner(System.in); int i = sc.nextInt();