SJSU/Udacity CS046

Lesson 7.2 - Array Lists and Arrays

  1. Arrays
  2. Array Elements
  3. Quiz: First Five Primes
  4. Quiz: Modifying the Array
  5. Quiz: Put 10 in the First and Last Spaces
  6. Quiz: Array of Strings
  7. Quiz: Enhanced For Loop
  8. Arrays or ArrayLists
  9. Partially Filled Arrays
  10. Homework Scores
  11. Homework Scores Continued
  12. Quiz: Read Scores
  13. Quiz: Sum Scores
  14. Quiz: Average Scores
  15. Inserting and Removing Arrays
  16. Quiz: Inserting and Removing Arrays Continued
  17. Quiz: Removing Lowest Score
  18. Quiz: Find Lowest Scoring Position
  19. Can We Streamline More

Quiz: Put 10 in the First and Last Spaces

Write a statement that puts the value 10 into the spot with the lowest index. values[0] = 10;
Write a statement that puts the value 10 into the spot with the highest index. values[values.length - 1] = 10; It is better to use an index values.length - 1 so that the code stays correct if the array length changes.

Problem on this page?

Your name:

Your email address:

Problem description:

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