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:
- Prints the first element of the array.
- Prints the third element of the array.
- Prints the 2nd to last element of the array (you will need to use
values.length
for this one).
For this problem we're expecting just a snippet of codeāso don't provide a method or class declaration.