There are two ways of declaring an array in java:
type variable-name[];
OR
type[] variable-name;
There are two ways of initializing an array in java:
1. Without assigning values
datatype [ ] arrayName = new datatype [size];
2. By assigning values
datatype [ ] arrayName={value1, value2, value3};