« All Events
7 PM – Intro To Java – Gamas
February 24, 2022 @ 7:00 pm - 8:00 pm
Today We Do
- We continued with EmailApplication project and we changed the “messageMap” from Map<String, EmailMessage> to Map<String, List<EmailMessage>> . This is so that we can store multiple email messages per person. But we are not done with code because we ran out of time.
Homework
- Change the code inside handleCreateEmail(EmailAccount). Before you do below code, you first have to check if messageMap already has an existing List. If it has, use that List instead of creating a new list.
-
List<EmailMessage> emailList = new ArrayList<>();
emailList.add(message);
messageMap.put(sendToEmail, emailList);