Membuat Buku Telfon dengan java

/*
* class BukuTelepon
*/
public class BukuTelepon {
public static void main (String[] args) {
String[][] contact = {
{“John Smith”, “03417600611”},
{“Indiana Jones”, “02746800432”},
{“Lara Croft”, “02854778231”},
{“Shaggy”, “021480451”},
{“Nicodemus Legend”, “03516768300”},
{“Clark Kent”, “0273900911”}
};
for(int i = 0; i < contact.length; i++) {
System.out.println(“Nama : ” + contact[i][0]);
System.out.println(“Telepon : ” + contact[i][1]);
System.out.println(“——————————-“);
}
}
}

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: