Selasa, 10 Januari 2012
Contoh Penggunaan Array 2 dimensi.


public class DuaD4 {
  public static void main(String [] args){
    String [][] tabel = new String[][] {{"1","Mila","9"},
                   {"2","Fajar","10"},
   {"3","Handy","8"}
                   };
System.out.println(tabel[0][0] + " " + tabel[0][1] + " " + tabel[0][2]);
System.out.println(tabel[1][0] + " " + tabel[1][1] + " " + tabel[1][2]);
System.out.println(tabel[2][0] + " " + tabel[2][1] + " " + tabel[2][2]);
  }
}

Selamat mencoba dan semoga berhasil.

0 komentar:

Member InTech