I know how to print on a new line using an ArrayList but what about using a standard Array like the one shown below?
public class School {
public static void main(String[] args) {
Student[] studentList = new Student[10];
//postGraduate Student #1
myDate completionDate = new myDate(6, 10, 2019);
Address address = new Address(199, "Hurrican road", 2568, "Australia");
studentList[0] = new postGraduate("Greg", 6789, address, 31272890, 4565000, completionDate, "Computer Science");
System.out.println("***Postgraduate Students***");
for (int i = 0; i < 1; i++) {
System.out.println(studentList[i]);
}
}
}
Esentinally i want the elements of each new student index("Greg", 6789, address, 31272890, 4565000, completionDate, "Computer Science") to be on a new line so it looks more tidy. Cheers