title: Setter Getter Arrays Java
body: <p>Can somebody help me with one little problem. I want to set for example 3 lectures to 1 student, but when i try this i can't set lectures.</p>
  
  <pre><code>student.setStudentLecture(lecture);
  student.setStudentLecture(lecture1);
  </code></pre>
  
  <hr>
  
  <pre><code>public class Student {
      private Lecture[] lecture;
  
      public void setStudentLecture(Lecture[] lecture) {
          this.lecture = lecture;
      }
  
      public Lecture[] getStudentLecture() {
          return lecture;
      }
  }
  </code></pre>