Q:

I'm trying to validate some code to get only 0-100 and no letters

Below is the code that I have but I keep getting the messages  

The operator <= is undefined for the argument type(s) Scanner, int, 

or 

The operator >= is undefined for the argument type(s) Scanner, int. 

I don't understand what I am doing wrong.
import java.util.Scanner;

public class Num {
    public static void main(String arg[]){

        int grade = 0;
        Scanner score = new Scanner(System.in);

        boolean testNum = false;

        while(testNum == false){
            if(score >= 0 && score <= 100){
                System.out.println("Enter in the test grade.");
                grade = score.nextInt();
                testNum = true;
            } else if(!score.hasNextInt()){
                System.out.println("Invalid Entry.");
                score.next();
            }
        }
    }
}

A:

The operator <= is undefined for the argument type(s) Scanner, int,
  or The operator >= is undefined for the argument type(s) Scanner

You should compare int input given to the scanner and not scanner directly with int values.
if(score <= 0 && score >= 100){//Incorrect : score is your scanner Object

//Add if condition to check whether scanner has int input by #hasNextInt
int input = score.nextInt();//Collect int input
if(input <= 0 && input >= 100){//compare it to check whether it's between 0-100

