I'd suggest to use
ArrayList[
^].
class InputStudentInfo {
public void main (String[] args)
{
ArrayList<studentInfo> students = new ArrayList<studentInfo>;
StudentInfo student = new StudentInfo();
student.studentName = "Justin Lazaro";
student.barrowedBooks = ("English, Math");
students.Add(student);
student = new StudentInfo();
student.studentName = "Gian Acuna";
student.barrowedBooks = "Math";
students.Add(student);
}
}
For further information, please see:
The for-each loop[
^]
By The Way: Why do you declare date as as a string?
String date;
String expiredDate;
Java knows
date data type[
^].