Students, please be sure to log in. This site does not use cookies and does not track/store work submitted when not signed in.
Unit 6 Problems
Java Reference Sheet
//where index is greater than 0 but less than the length of the array
twoString
Objective(s): Practice declaring and instantiating arrays.
Complete the code so that the array of Strings contains the values shown in the same order.
[ "hello", "world"]
To access a specific element of an array you must provide the index where the element is located. The position of elements starts at index 0 in most programming languages and is the for Java. This means that the valid indexes go from 0 to length - 1 where length is the length of the one-dimensional array.
Examples: