Answers for "instantiate matrix java"

0

instantiate matrix java

int[][] matrix1 = new int[2][2];
matrix1[0][0] = 1;
matrix1[0][1] = 2;
matrix1[1][0] = 3;
matrix1[1][1] = 4;

//or

int[][] matrix2 = {{1,2},{3,4}};
Posted by: Guest on May-05-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language