I am trying to use toString() method , but somehow doesn't work, instead of getting the actual values ( name and numbers of student) I am getting this :
================= students list =====================
----------------------
com.se.classes.Student@4554617c
com.se.classes.Student@74a14482
com.se.classes.Student@1540e19d
===============================================
This is the method in the com.se.classes :
public String toString() {
s = "\n================= students list =====================\n";
s = s + "\n----------------------";
for (int i = 0; i < nb; i++)
s = s + "\n" + student[i];
s = s + "\n===============================================";
return s;
}
Please help. Thanks.