title: Harded Coded Java List in Java Class
body: <p>I am conducting some testing on a list item for object Student however i prefer to create a hard coded list in the java class object and just pull the data from there rather than connect to the database and select records in a result set. However it's been very long time since i did this and i think i am not writing up the class accurately.</p>
  
  <p>I would like every time i call this class or instantiate it that i get back the hard coded list. Under is the class. I need some assistance in setting up the hard coded list. </p>
  
  <p><strong>Student Class</strong></p>
  
  <pre><code>public class Student {
  
      private int studentId;
      private String studentLastname;
      private String studentFirstName;
      private int studentAge;
  
  
      public Student() {
  
      }
      public Student(int studentId, String studentLastname,
              String studentFirstName, int studentAge) {
  
          this.studentId = studentId;
          this.studentLastname = studentLastname;
          this.studentFirstName = studentFirstName;
          this.studentAge = studentAge;
      }
      public int getStudentId() {
          return studentId;
      }
      public void setStudentId(int studentId) {
          this.studentId = studentId;
      }
      public String getStudentLastname() {
          return studentLastname;
      }
      public void setStudentLastname(String studentLastname) {
          this.studentLastname = studentLastname;
      }
      public String getStudentFirstName() {
          return studentFirstName;
      }
      public void setStudentFirstName(String studentFirstName) {
          this.studentFirstName = studentFirstName;
      }
      public int getStudentAge() {
          return studentAge;
      }
      public void setStudentAge(int studentAge) {
          this.studentAge = studentAge;
      }
  
  
  }
  </code></pre>
  
  <p><strong>Data</strong></p>
  
  <p><strong>I would like to insert the following data</strong></p>
  
  <pre><code> Student.add(1, "john","william", 20);
   Student.add(2, "bob","elis", 25);
   Student.add(3, "harry","potter", 19);
   Student.add(4, "micheal","louis", 20);
   Student.add(5, "smith","sobers", 30);
  </code></pre>