Determine if the student has passing grades I made a program in Java that asks for the student's name, course, and grades. After the required text inputs are filled, the program will then show the result. If the student passed, the program will show &quot;PASSED&quot;; if the student is failing, the program will show &quot;ACADEMIC WARNING&quot;; if the student failed, the program will show &quot;FAILED&quot;.
So this is the code:
/*
 * Java Grades by fosionef
 */


import javax.swing.JOptionPane;
import java.util.Scanner;


public class JavaGrades {
    public static void main(String[] args) {
        getStudentName();
        getStudentCourse();
        getGrades();
    }


    // get student name
    public static void getStudentName() {
        Scanner input = new Scanner(System.in);
        String name = JOptionPane.showInputDialog(null,&quot;Input Name: &quot;);
        //String name = input.nextLine();
        JOptionPane.showMessageDialog(null,&quot;Name: &quot; + name.toUpperCase());
    }


    // get student course
    public static void getStudentCourse() {
        Scanner input = new Scanner(System.in);
        String course = JOptionPane.showInputDialog(null,&quot;Input Course: &quot;);
        //String course = input.nextLine();
        JOptionPane.showMessageDialog(null,&quot;Course: &quot; + course.toUpperCase());
    }


    // get student grades
    public static void getGrades() {
        Scanner input = new Scanner(System.in);
        double grades = Double.parseDouble(JOptionPane.showInputDialog(null,&quot;Input grades: &quot;));
        //double grades = input.nextDouble();

        if(grades == 90 || grades &gt;= 80) {
            JOptionPane.showMessageDialog(null,grades + &quot;: PASSED!&quot;);
        }else if(grades == 79 || grades &gt;= 75) {
            JOptionPane.showMessageDialog(null, grades + &quot;: ACADEMIC WARNING!&quot;);
        }else if(grades &lt;= 74) {
            JOptionPane.showMessageDialog(null,grades + &quot;: FAILED!&quot;);
        }else{
            JOptionPane.showMessageDialog(null, &quot;Please input the required&quot;);
        }
    }
}

How was the code? I am looking forward to corrections and suggestions. That way I can improve my coding skills. Thank you.
Reduce code repetition / redundant checks
Your if statements are redundant. If grade = 90, it already satisfies the grade &gt;= 80, so just use that. No need to check if it equals 90 exactly because that's already covered.
Instead of having four different lines where you show a message dialog, have a string that you assign the message to and print that at the end? Something like this:
String message;
if (grades &gt;= 80) {
    message = grades + &quot;: Passed!&quot;;
} else if (grades &gt;= 75) {
    message = grades + &quot;: Academic Warning!&quot;;
} else {
    message = grades + &quot;: Failed!&quot;;
}
JOptionPage.showMessageDialog(null, message);

Reduce unused code
You created a Scanner in all of your functions, but never use them. I'd remove them for code clarity.