there is an list of student entity.
List<Student> student = new Arraylist<Student>();
where
public student{
private id;
private name;
private class;
//setter and getter
}
By the foreach loop:
for(Student std : student){
System.out.println(std.getName());
}
above is the normal way. But how to print them with multithreading? three student details together print. means taking three threads toghter