« All Events
10 AM – Intro To Java
October 9, 2021 @ 10:00 am - 11:00 am
Today We Do
- We continued our EmailApplication project. We added the ability to create new email and check inbox feature.
- Also when we create a new email, we check if the email entered exists in our system.
Homework
- Inside EmailApplication, add code to enable “3. List all Email Accounts” . All email accounts now is stored inside HashMap, but you have not learned how to go through all elements inside HashMap yet. This is what you need to do:
-
// Instead of
for(EmailAccount acct: accountMap) {
// do your code
}
// you need to do the following instead
for(emailAccount acct: accountMap.values()) {
// print email and name from acct
}
- Inside SchoolApplication, when you try to find student by HashMap, you will get an error when trying to find a student that does not exists in our system. Add code so when student does not exists, the system will print “<student name> does not exists in our system”.