import java.util.*;
import java.lang.*;
import java.io.*;
// The main method must be in a class named "Main".
class Main {
public static void main(String[] args) {
System.out.println("print 2d array");
int [][] mat1 = { {3,4,5} , {8,5,9} };
// 2d array we name it [i][j]
System.out.println("length of matrices ="+mat1.length);
for ( int i = 0; i<= mat1.length; i++)
{
for (int j=0; j<=mat1.length; j++)
System.out.println(mat1[i][j]);
}
}
}
To embed this program on your website, copy the following code and paste it into your website's HTML: