public static void main(String args[]){
int x,y;
x=5;
y=8 - x--;//dibaca int awal, lalu diturunkan
System.out.println("Contoh 1");
System.out.println("x="+x+","+"y="+y);
x=5;
y=8 - --x;//diturunkan baru di baca
System.out.println("Contoh 2");
System.out.println("x="+x+","+"y="+y);
}
}
Output :
Contoh 1
x=4,y=3
Contoh 2
x=4,y=4
0 Komentar
Penulisan markup di komentar