✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Вкажіть причину помилки компіляції у частині програмного коду:
Scanner sc = new Scanner(System.in);
int i;
System.out.print("Введеіть ціле число: ");
if (sc.hasNextInt()) {
i = sc.nextDouble();
System.out.println(i * 2);
} else {
System.out.println("Ви ввели не ціле число");
}