KartuHandphone Oop
Scriptpublic class KartuHandphoneGisa{
public static void main(String[] args){
String [][] entry ={{"AS","085221959513","Xl","087765211456","simpati","081211155666"}};
int x = 0;
for (x = 0; x < 1; x++){
System.out.println("MerkKartu : " + entry[x][0]);
System.out.println("NoKartu :" + entry[x][1]);
System.out.println("MerkKartu : " + entry[x][2]);
System.out.println("NoKartu :" + entry[x][3]);
System.out.println("MerkKartu : " + entry[x][4]);
System.out.println("NoKartu :" + entry[x][5]);
System.out.println("");
}
}
}
Aritmatika
Scriptpublic class Gisa{
public static void main(String[]args){
int a=10;
int b=20;
int c=30;
System.out.println("Nilai Variable....");
System.out.println("a="+a);
System.out.println("b="+b);
System.out.println("c="+c);
System.out.println("a+b="+(a+b));
System.out.println("a+c="+(a+c));
System.out.println("c-a="+(c-a));
System.out.println("b-a="+(b-a));
System.out.println("c*a="+(c*a));
System.out.println("b*a="+(b*a));
System.out.println("c/b="+(c/b));
System.out.println("c/a="+(c/a));
}
}
Handphone Oop
Script
public class HandphoneGisa{
public static void main(String[] args)
{String [][] entry ={{"Nokia","1100","Nokia","1200"}};
int x = 0;
for (x = 0; x < 1; x++){
System.out.println("merk : " + entry[x][0]);
System.out.println("tipe : " + entry[x][1]);
System.out.println("merk : " + entry[x][2]);
System.out.println("tipe : " + entry[x][3]);
System.out.println("");
}
}
}
Alamat Oop
public class Alamat{
public static void main(String[] args)
{String [][] entry ={{"jalan.layungsari","04","06","muara sari","Tasikmalaya","46215"}};
int x = 0;
for (x = 0; x < 1; x++){
System.out.println("alamat : " + entry[x][0]);
System.out.println("RT : " + entry[x][1]);
System.out.println("RW : " + entry[x][2]);
System.out.println("kelurahan : " + entry[x][3]);
System.out.println("kota : " + entry[x][4]);
System.out.println("kode pos : " + entry[x][5]);
System.out.println("");
}
}
}