I think everything is good?
I don't understand what's wrong, I suppose that every step is allright.
package en.codegym.task.pro.task04.task0403;
import java.util.Scanner;
/*
Summation
*/
public class Solution {
public static int x = 0;
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// Scanner lineScanner = new Scanner(System.in);
boolean isContinue = false;
while (!isContinue) {
if (scanner.hasNextInt()) {
int y = scanner.nextInt();
x += y;
} else if (scanner.hasNextLine()){
String s = scanner.nextLine();
isContinue = s.equals("ENTER");
}
}
System.out.println(x);
}
}