- buka netben
- pilih aplication java
- berinama ContohArray2
- tulis souce code berikut atau copy
public class ContohArray2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
String[] namaKelas = {
"Eko", "Kurniawan", "Khannedy"
};
System.out.println(namaKelas[0]);
System.out.println(namaKelas[1]);
System.out.println(namaKelas[2]);
int panjang = namaKelas.length;
System.out.println(panjang);
}
}
No comments:
Post a Comment