Challenge: Fill an Array
Task
Your task is to create an array of integers of size 20
named testArray
and fill it with numbers from 1 to 20 inclusive using a for loop with the loop variable named i
to iterate over its indices in a concise way.
Main.java
12345678object Main { def main(args: Array[String]): Unit = { var ___ = new ___[___](___) // Declare an array variable for (___ ___ testArray.___) { ___(___) = ___ // Fill the array } } }
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 4. Hoofdstuk 3
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Suggested prompts:
Stel mij vragen over dit onderwerp
Vat dit hoofdstuk samen
Toon voorbeelden uit de praktijk
Awesome!
Completion rate improved to 2.86
Challenge: Fill an Array
Veeg om het menu te tonen
Task
Your task is to create an array of integers of size 20
named testArray
and fill it with numbers from 1 to 20 inclusive using a for loop with the loop variable named i
to iterate over its indices in a concise way.
Main.java
12345678object Main { def main(args: Array[String]): Unit = { var ___ = new ___[___](___) // Declare an array variable for (___ ___ testArray.___) { ___(___) = ___ // Fill the array } } }
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 4. Hoofdstuk 3