тяжело дается задача! что то слепил , вроде понял чуть чуть что к чему! но все равно не читается
package com.javarush.task.pro.task04.task0403;
import java.util.Scanner;
/*
Суммирование
*/
public class Solution {
public static void main(String[] args) {
//напишите тут ваш код
Scanner digit = new Scanner(System.in);
int sum = 0;
boolean exit = false;
while (!exit){
if(digit.hasNextInt()){
int number = digit.nextInt();
sum = sum+number;
}else if (digit.hasNextLine()){
String line = digit.nextLine();
if (line.equals ("ENTER")){
exit=true;
}
}
}
}
}