Sunday, February 25, 2018

Java program : Two dimensional Arrays

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]);
    }
}

No comments:

Post a Comment

How can I run a C++ program directly from Windows?

How-can-I-run-a-C-program-directly-from-Windows