Examples of array core functionality.

Note: Java array indexes are zero-based (i.e., the first element of the array is at index 0, the last element of the array is at index (array.length - 1).

Examples
int[] nums = {10, 20, 30, 40};

//printing array
println("nums: " + Arrays.toString(nums));

//length of array
int l = nums.length;
println("Length of nums array is: " + l);

//getting an element
int elem = nums[2];
println("Number at index=2 is: " + elem);

//putting a new elem at a specified index
nums[2] = 999;
println("Changed number at index=2 to 999");
println("nums: " + Arrays.toString(nums));