Practice Quiz on Types

The questions in this quiz refer to a CalendarEvent class with the following methods:

public String getEventName() { … } // Returns the name of the event, e.g., "Mom's Birthday"
public Date getDate() { … } // Returns the date of the event (assume there is a Date class)
public ArrayList<String> getInvitees() { … } // Returns a list of people's names (invited guests)

You also have the following variable declared:

ArrayList<CalendarEvent> events = new ArrayList<CalendarEvent>(); // ... This is code that adds 10 items to the events list ...
  1. What is the type of events ?





  2. What is the type of events.get(0) ?





  3. What is the type of events.get(0).getEventName() ?





  4. What is the type of events.get(0).getDate() ?





  5. What is the type of events.get(0).getInvitees() ?





  6. What is the type of events.get(0).getInvitees().get(0) ?