Java Program Array Display Example

This java program is to initialize and display an array.
class Arr1
{
                public static void main(String args[])
                {
                                int a[]={1,2,3,4};
                                int i;
                                for(i=0;i
                                {
                                                System.out.println(a[i]);
                                }
                }
}

Add Comment