Что хочет? что не так?
подскажите
package com.javarush.task.pro.task04.task0420;
import java.util.Scanner;
/*
Страшное число
*/
public class Solution {
public static void main(String[] args) {
System.out.println("Введите предполагаемое число");
checkNumber(3);
}
public static void checkNumber(int number) {
Scanner scanner = new Scanner(System.in);
int inputNumber;
boolean ert = false;
while (!ert) {
if (scanner.hasNextInt()) {
int d = scanner.nextInt();
if (d == number)
System.out.print("Загадочное число равно " + d);
break;
} else
System.out.print("Попробуй еще раз");
}
}
}