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