In the below program, the variable "int x" is declared inside the "while" loop. Will the program generate many variables of int x while the loop is executed over and over again? Should I declare the int x outside the loop? like, int x = ""; then in the loop x = console.nextInt(); Scanner console = new Scanner(; int sum = 0; while (console.hasNextInt()) { int x = console.nextInt(); sum = sum + x; } System.out.println(sum); Thank you