+ 1
java help
public class Main { public static int[][] createMatrix(int x,int y){ int [][] data = new int [x][y]; return data; } public static void main(String[] args) { System.out.println(createMatrix(5,7)); Help me to change the code that to create matrix 5x7;3x1;4x9
1 Answer
0
System.out.println (createMatrix (3,1));
You only have to change x and y when you call this method. But I'm not sure if you have to fill your matrix.