class ArrayTwoD
{
static int[][] a={{11,22,33},{44,55,66}};
public static void main(String[] args)
{
System.out.println(a[0][0]);
System.out.println(a[1][0]);
System.out.println(a[0][1]);
System.out.println(a[1][1]);
System.out.println(a[0][2]);
System.out.println(a[1][2]);
}
}
{
static int[][] a={{11,22,33},{44,55,66}};
public static void main(String[] args)
{
System.out.println(a[0][0]);
System.out.println(a[1][0]);
System.out.println(a[0][1]);
System.out.println(a[1][1]);
System.out.println(a[0][2]);
System.out.println(a[1][2]);
}
}
No comments:
Post a Comment