public class MyClass {
public static void main(String args[]) {
int[][] array2d =
{
{ 1, 2, 3, 6, 0},
{-5, -4, 0, 7, 9},
{ 1, 18, 100, 14, 6},
{ 9, 10, 27, 12, 13}
};
int cols = array2d[0].length;
int i = 1, j = 3;
int index = i * cols + j;
System.out.println(index);
}
}
/*
run:
8
*/