so here is the code fragment
private int getChoice(int lower, int upper) {
System.out.println("--------------------------------------------------------------");
System.out.println("Please enter your choice: ");
String userSelection = Keyboard.readInput();
Integer.parseInt(userSelection);
if (userSelection >= lower && userSelection <= upper){
return userSelection;
}else{
displayMainMenu();
}
the problem is ">="
where it says "bad operand types for binary operator '>=' "
first type: java.lang.string
second type: int
Integer.parseInt(userSelection); this line is supossed to turn the string to an int and now im super confused.
thanks in advance