Array in Java.

Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.

Code :