fork download
  1. class Size{
  2. public static void main(String argn[]){
  3. int data [] = {45,87,124,78,127,2};
  4. System.out.println("size of the array is "+data.length);
  5. for(int i = 0; i < data.length; i++)
  6. System.out.println(data[i]);
  7. }
  8. }
Success #stdin #stdout 0.09s 27920KB
stdin
Standard input is empty
stdout
size of the array is 6
45
87
124
78
127
2