Monday, 7 October 2013

Program Java Sederhana "Array 1 Dimensi"

Berikut ini saya akan share contoh program java sederhana dengan menggunakan Array 1 Dimensi yang mungkin teman - teman pemula membutuhkannya buat tugas .

Berikut Scriptnya :

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modul1;

/**
 *
 * @author LaptopKU
 */
public class no1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int nilai[] = {1,2,3,4,5,6,7,8,9,10};
      
        //menampilkan array menggunakan do while loop
        int x = 0;
        do {
            System.out.print(" "+nilai[x]);
            x++;
        }
        while (x<nilai.length);
    }
}

Atau kalau ingin langsung file project nya bisa download di link dibawah ini :

Download Script Project Array 1 Dimensi

0 comments: