Quiz: The Public Interface of the Person Class
If John wants to befriend Mary, what might the method call look like in Java? (Assume there are objects john and maria.) |
john.addFriend(mary) |
There are many possible ways—this is the API that Sara chose. Don't worry if yours got “corrected”. |
Ooop! I wrote mary instead of maria. Looks like I could have used a compiler to check my work here.