I have little problem.
In first method of my code I’ve loaded data about students from txt file to List collection. There are more types of students (classes PrimaryStudent, SecondaryStudent, HightSchoolStudent, UniversityStudent, ExternStudent etc…)
Now, in other method I want to save every kind of student to different directory. My problem is in that I have all objects in one collection in that interface. How can now I differentiate or what should I do to differentiate all types of students? Please help.
I have little problem. In first method of my code I’ve loaded data about
Share
If your list is generic, i.e.
List<Student>you could do the following:If your list is not generic, you can separate them like so: