Enhanced For Loops
Flashcard
•
Computers
•
10th - 12th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

5 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the correct code to put in place of /*******/ in the Enhanced For Loop to sum all the values in an array of ints called values ?
int sum = 0;
for(int value: /*******/)
{
sum = sum + value;
}
Back
values
2.
FLASHCARD QUESTION
Front
What is the correct code to put in place of /*******/ in the Enhanced For Loop to sum all the values in an array of ints called values ?
int sum = 0;
for( /*******/ : values)
{
sum = sum + value;
}
Back
int value
3.
FLASHCARD QUESTION
Front
Assume that an array of ints called values has been initialized. We want to write an Enhanced For Loop to sum all the values. What is the correct code to put in place of /*******/
int sum = 0;
for( int value : values)
{
/*******/
}
Back
sum += value;
4.
FLASHCARD QUESTION
Front
What is the correct code for an enhanced for loop to say Hello to each name in the array of Strings called friends?
for(/*********/)
{
System.out.println("Hello " + friend);
}
Back
String friend:friends
5.
FLASHCARD QUESTION
Front
Assume that an array of Strings called friends has been created and initialized. We want to write an enhanced for loop that says Hello to each name in the array. What is the correct code that goes in place of /*********/? for(String friend:friends) { /***********/ }
Back
System.out.println("Hello " + friend);
Similar Resources on Wayground
10 questions
Feminism and Socialism
Flashcard
•
11th Grade
12 questions
Difference of Squares
Flashcard
•
9th - 12th Grade
8 questions
Vocabulary Flashcards
Flashcard
•
10th Grade
8 questions
Chemistry Formulae and Concepts
Flashcard
•
10th Grade
8 questions
Attachment Theory Flashcard
Flashcard
•
12th Grade
6 questions
Konektory
Flashcard
•
9th - 12th Grade
10 questions
Similar Triangles Proofs
Flashcard
•
9th - 12th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
11 questions
NEASC Extended Advisory
Lesson
•
9th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
10 questions
Boomer ⚡ Zoomer - Holiday Movies
Quiz
•
KG - University
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
20 questions
Multiplying and Dividing Integers
Quiz
•
7th Grade