public class Patient extends Person {
private String Diagnosis;
private Appointment[] appointment = new Appointment[2];
private int numberofAppointment;
public static int numberOfPatient;
public void DellappointmentAT(int index) {
appointment[index].setAvailable(true);
numberofAppointment--;
}
}
The class i created, has an Array of object as data fields and i have this method that should remove an element from this array, I want to delete the element without changing the array size.
ArrayListfor this task.