title: What does this line of code means using Iterator 'Student st = (Student)itr.next();'
body: <p>I'm practicing ArrayList program. I would like to ask the meaning of this line.</p>
  
  <blockquote>
    <p><code>Student st = (Student)itr.next();</code></p>
  </blockquote>
  
  <pre class="lang-java prettyprint-override"><code>    public static void main(String[] args) {
  
          Student s1 = new Student(1,"owelcute",28);
          Student s2 = new Student(2,"lucas",2);
          Student s3 = new Student(3,"jor",30);
  
          ArrayList &lt;Student&gt; studentList = new ArrayList&lt;Student&gt;();
          /*
          declaring class Student in ArrayList
           */
  
          studentList.add(s1);
          studentList.add(s2);
          studentList.add(s3);
  
          Iterator itr = studentList.iterator();
  
          while(itr.hasNext()){
  
              Student st = (Student)itr.next();
              System.out.println(st.rollno + " "+ st.name + " "+ st.age);
          }
  
      }
  </code></pre>