также разъясните пожалуйста конструкцию
boolean isExit =false
while (!isExit)
присваиваем переменной значение false, тогда !isExit будет true?
package com.javarush.ts.pro.task0403;
import java.util.Scanner;
/*
Суммирование
*/
public class Solution {
public static void main(String[] args) {
//напишите тут ваш код
int sum = 0 ;
Scanner scanner = new Scanner(System.in);
boolean isExit = false;
while(!isExit) {
if ( scanner.hasNextInt())
{ int number = scanner.nextInt();
sum = sum+number;}
else
{
if (scanner.hasNextLine())
{ String s = scanner.nextLine();
if (s.equals("ENTER") )
{ System.out.println(sum);
isExit = true;}
}
}
}
}
}