Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is an array?
Think about how the data types in Java work.
How do you access an element in an array?
Remember that indexing starts at 0.
What does the length property of an array return?
Think about how arrays' sizes are defined.
True or False: The for-each loop can modify the elements of the array while iterating.
Consider what modifications are allowed during iterations.
Given an array of integers, write a Java method that returns the sum of all elements using a for-each loop.
Think about how you can accumulate values as you loop through the array.
Create a Java method that accepts an array of strings and prints only those strings that have more than three characters using a for loop.
You will need a condition inside the loop to filter the strings.
5 more questions in this section. Enroll free to practise them all.
Enroll free