« All Events
5 PM – Intro To Java – Gamas
February 5, 2022 @ 5:00 pm - 6:00 pm
Today We Do
- We continued learning Map/HashMap by storing Student into map and finding Student in map. Also we did list all students by going through every value in the map using for loop.
- We compared the performance of searching Map vs List. The result was searching Student using Map.key (firstName) is really fast.
Homework
- In findTeacher()… add code to print “We cannot find %s teacher in our system.” when the teacher name cannot be found in the Map. This is very similar to what we did in findStudentByMap()
- In listAllStudents()… add code to check if there is no students in the system to print “There are no students in our system yet.” . Do the same thing with listAllTeachers().