Tuesday, December 22, 2015

one dimensional array:

one dimensional array:
package javaapplication27;


public class OneDArray {
    public static void main(String[] args) {
     
   
    int days[]=new int[12];//declaring array
    days[0]=1;
    days[1]=10;
    days[2]=112;
    days[3]=12;
    days[4]=13;
   
        System.err.println(days[0]);
   
}
}


The output is:
run:
1
BUILD SUCCESSFUL (total time: 1 second)

0 comments:

Post a Comment