SJSU/Udacity CS046

Lesson 7.1 - Array Lists and Arrays

  1. ArrayLists
  2. Elements
  3. Quiz: Drawing All the Elements
  4. Fixing the Overlap
  5. Quiz: Look at the Element Before this One
  6. Meet the Enhanced For Loop
  7. Quiz: Enhanced For Loop
  8. Quiz: Friends Done Right
  9. Quiz: Get Num Friends
  10. Refactoring
  11. Modifying an ArrayList
  12. Quiz: Modifying the Contents
  13. Quiz: Books To Read
  14. Quiz: Lost In A Good Book
  15. Quiz: Lost In A Good Book 2
  16. Quiz: Array Algorithms Sum Over All Elements
  17. Quiz: Array Algorithms Max and Min
  18. Quiz: Array Algorithms Count Matches
  19. Quiz: Array Algorithms Find the First Match
  20. Quiz: Array Algorithms Find All Matches
  21. Quiz: Separators
  22. Quiz: Unfriend Revisited
  23. Another Way to Implement Get Friends
  24. Quiz: Implementing Unfriend
  25. Quiz: Talk To
  26. Removing Mean Friends
  27. Quiz: Is This Code Correct
  28. Quiz: Implementing Removing Mean Friends

Quiz: Friends Done Right

Actually, around 1:05, my code has a typo that I sneakily fix later. It should be

if (0 <= friendIndex && friendIndex < friends.size())
        {
            return friends.get(friendIndex);
        }
        else
        {
            return "";
        }

Problem on this page?

Your name:

Your email address:

Problem description:

To protect against spam robots, please answer this simple math problem:
× =