public class Twoarray
{
public static void main(String args[])
{
int a[][]={{5,2},{1,4},{2,3}};
System.out.println("given Two-dimensional array is: ");
for(int i=0;i<3;i++)
{
for(int j=0;j<2;j++)
{
System.out.print(a[i][j]);
}
System.out.print(" ");
}
}
}
Output:
ReplyDeletegiven Two-dimensional array is:
52 14 23