title: What am I doing wrong with this Object array and the getter / setter methods?
body: <p>I have an assignment to make a student class with setter and getter methods followed by a course class where we make an array of student objects that we use to test the methods from that student class. I am clearly doing something wrong though.</p>
  <pre><code>class Course{
      
      static Student[] Roll = new Student[10];
      
      public static void main(String[] args) {
          Roll[0] = new Student(&quot;Burris&quot;,&quot;Adam&quot;, 20221483, &quot;CompSci&quot;, 4.0, 2, 8);
          Roll[1] = new Student(&quot;Blanton&quot;,&quot;Emily&quot;, 21221484, &quot;Finance&quot;,3.0, 2, 6);
          Student Student3 = new Student(&quot;Allred&quot;,&quot;Adam&quot;, 22221485, &quot;Kinesiology&quot;,3.8, 20, 76);
          Student Student4 = new Student(&quot;Johnston&quot;, &quot;Josh&quot;, 23221486, &quot;CompSci&quot;, 3.0, 20, 60);
          Student Student5 = new Student(&quot;Perryman&quot;, &quot;Noah&quot;, 24221487, &quot;BCIS&quot;, 2.79, 43, 120);
          
          System.out.println(Student3.getName());
          Student3.setFullName(&quot;Emily Burris&quot;);
          System.out.println(Student3.getName());
          System.out.println(Roll[1].getName());
      }
  }
  </code></pre>
  <p>Result:</p>
  <pre><code>Noah Perryman
  Emily Burris
  Emily Burris
  </code></pre>
  <p>I'm not understanding why the getName() is only pulling the last reference to names. First it is the bottom student then  it is my setFullName method.</p>
  <p>Student class:</p>
  <pre><code>class Student{
      private static String fullName;
      private static int studentID;
      private static String major;
      private static double GPA;
      private static int classesTaken;
      private static double scores;
      
      
      public Student (String lastName, String firstName, int studentID, String major, 
              double GPA, int classesTaken, double  scores) {
          
          Student.fullName = firstName + &quot; &quot;+ lastName;
          this.studentID = studentID;
          this.major = major;
          this.GPA = GPA;
          this.classesTaken = classesTaken;
          this.scores = scores;
      }
      
      public String getName() {
          return fullName;
      }
      
      public void setFullName(String fullName) {
          this.fullName = fullName;
      }
      
      public int getStudentID() {
          return studentID;
      }
      
      public void setStudentID(int studentID) {
          this.studentID = studentID;
      }
      
      public String getMajor() {
          return major;
      }
      
      public void setMajor(String major) {
          this.major = major;
      }
      
      public void completed(double newScore) {
          classesTaken = classesTaken + 1;
          scores = scores + newScore;
          GPA = scores / classesTaken;
      }
      
      public double getGPA() {
          return GPA;
      }
      
      public int getClassesTaken() {
          return classesTaken;
      }
      
      public double getScores() {
          return scores;
      }
      
  }
  </code></pre>