Kotlinlearncs.online LogoJava
Return to List

Solve: Print Some Array Values

Created By: Justin Maier
/ Version: 2024.9.1

Given an int array values that has at least three elements, write a segment of code that does the following:

  1. Prints the first element of the array.
  2. Prints the third element of the array.
  3. Prints the 2nd to last element of the array (you will need to use values.length for this one).

Related Lessons

Stuck? You may find these lessons helpful: