How to populate a 2d array using methods in java. The inputs are to be input by the user