I'm practicing ArrayList program. I would like to ask the meaning of this line.
Student st = (Student)itr.next();
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 <Student> studentList = new ArrayList<Student>();
/*
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);
}
}