Sunday, October 11, 2015

Find matrix element in java

How to find Matrix index value using java

public
static int findElement(int x, int y) {
          int[][] matrix = { { 1, 2, 3 }, { 2, 3, 4 }, { 3, 4, 5 } };
          return matrix[x][y];}

No comments:

Post a Comment