You should increase dimensions of the given array.
Refer below resource
https://www.flowerbrackets.com/multi...array-in-java/
https://www.flowerbrackets.com/arrays-in-java/