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

What is a data structures

  Data structure is a tool in the hands of a programmer for  storing a large number of data items  in the main memory (RAM) of a computer wh...