Q:

Object oriented why isn't this grading method working?

I want to know if I removed my second if where if the points is higher than 100 print enter a lower grading point this is not working ,but when i type in -100 it works why so?
public class nameofclass {

    private int grade;

    public void enterGrade(int points) {

        if(points > 0) {
            grade = grade + points;
        } else {
            if(points > 100) { 
                System.out.println("Enter a lower grading point");
            }
            System.out.println("Enter positive grading point");
        }
    }
}

A:

Your first if filters points more than 0, which means the JVM only goes to  else when the points are less than or equal to 0. So your second if never gets executed.
if(points > 0) {
    ...
} else {
    //only if points are less than or equal 0

    if(points > 100) {
        //never runs
    }
}

So put your second if inside the first if like this,
if(points > 0) {
    if(points > 100) {
        System.out.println("Enter a lower grading point");
    }
} else {
    //only if points are less than or equal 0
}

