2D Array In Java
public class TwoDArray
{
public static void main(String args[])
{
int [][] a={{1,2,3},{4,5,6},{7,8,9}};
for(int row=0;row<3 data-blogger-escaped-br="" data-blogger-escaped-row=""> {
for(int col=0;col<3 data-blogger-escaped-br="" data-blogger-escaped-col=""> System.out.print(a[row][col]);
System.out.println();
}
}
}
Comments
Post a Comment