title: Use of static method with enum in Java
body: <p>I have this assignment that I need use a static method to get student IDs then within that static method evaluate them if the students have passed or failed their classes. It is a bit challenging for me because the static method should only take one argument.</p>
  
  <p>Can this be accomplished by not changing private variables to private static variables?</p>
  
  <p>Any direction is much appreciated.</p>
  
  <pre><code>import java.util.ArrayList;
  public class Grade {
      public static void main(String[] args) {
          ArrayList&lt;GradeDetail&gt; gradeList = new ArrayList&lt;GradeDetail&gt;() ;
  
          System.out.println("Student ID: ");
  
          for(String s : args) {
              boolean match = false;
  
              for(GradeDetail grade : GradeDetail.values()) {
                  if(s.equals(grade.getCode())) {
                      gradeList.add(grade);
  
                      match = true;
                  }
              }
  
              if(!match) {
                  System.out.printf("unknown student ID entered!");
              }
          }
  
          System.out.println("Students who passed: ");
          //Some function here
  
          System.out.println("Students who failed: ")
          //Some function here
  
          return;
      }
  }
  
  enum GradeDetail {
       JOHN       (101, 90)
     , ROB        (102, 50)
     , JAMES      (103, 55)
     ;
  
      private final int studentID;
      private final int studentGrade;
  
      GradeDetail(int id, int sGrade) {
          studentID = id;
          studentGrade = sGrade;
      }
  
      public int getID() {return studentID;}
  
      public int getGrade() {return studentGrade;}
  
  }
  </code></pre>
  
  <p>I honestly don't know how to go about this..</p>