Java Practice It | Self-Check 7.23: arrayCodeTracing | arrays, syntax, array basics

Опубликовано: 02 Октябрь 2024
на канале: Computer Engineering
334
3

More practice its:
   • Java | Practice-It | Self Check & Exe...  


Problem:
https://practiceit.cs.washington.edu/...


Question:
What are the values of the elements in the array numbers after the following code is executed?

int[] numbers = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
for (int i = 1; i { 10; i++) {
numbers[i] = numbers[i - 1];
}