Issue
I was wondering if there is a way in java to pull and integer found at a specific index in an array. I then want to store that integer in a variable. Is this something that can be done?
Solution
Try this:
int[] arr = new int[]{ 1,2,3,4,5,6 };
int index = 0;
int value = arr[index];
// value will be 1
Answered By - Kevin Wallis