You have to know that the if is the Boolean type operator.
Solutions:
You have to use another loop like while, do-while loop to solve your problem.
Replace if with the while:
System.out.println("What is your age?\n");
age = userInput.nextInt();
while((age > 120) || (age < 1)) {//error message
System.out.println("ERROR Please enter a valid age");
System.out.println("");
System.out.println("What is your age?\n");
age = userInput.nextInt();
}//end i
If the user enters an invalid character like “E” or anything else which is not a number, then the loop will exit and if the age is less than 1 year or greater than 120 years then it will ask the user again to enter the correct values. The loop will continue to looping until the conditions are met.
Use the do-while loop:
boolean valid;
do {
System.out.println("What is your age?\n");
age = userInput.nextInt();
valid = age > 1 && age < 120;
if (!valid) {
System.out.println("ERROR Please enter a valid age");
}
}while (!valid);
To read the user input, it will prompt the user to type her input into the console and will continue to looping until the valid values found.
I hope this will help to solve your problem.