I am new to java and this is our first assignment but i am unclear right now that why didnt our teacher passes a array of class object to the Add Student method instead he created array of object as private and just passed the name of the array.How can i add data of students now
public class StudentManagement {
private Student students [] ;
private int CAPACITY ;
private int CURRENT_POSITION;
public StudentManagement(){
CAPACITY = 3;
CURRENT_POSITION = 0;
students = new Student[CAPACITY];
}
public void addStudent(Student student){
}
Aucun commentaire:
Enregistrer un commentaire