Selasa, 23 April 2013

Contoh array satu dimensi JAVA


Palembang, 24 April 2013 10:40


public class CobaArray {
    public static void main(String[] args){
    int ages[] = {10, 20, 30};
       for (int i=0; i
           System.out.println(ages[i]);
       }
    test(ages);
    for (int i=0; i
           System.out.println(ages[i]);
    }
  }
public static void test(int arr[]){
  for (int i=0; i
        arr[i] = i + 100;
  }  
}

Tidak ada komentar:

Posting Komentar