class TestOperator{
public static void main(String args[]){
int a=10, b=15;
System.out.println("a = " + a);
System.out.println("a++ = " + a++);
System.out.println("a = " + a);
System.out.println("++a = " + ++a);
System.out.println();
System.out.println("b = " + b);
System.out.println(a ==13 && b++ == 15);
System.out.println("a = " + a);
System.out.println("b = " + b);
System.out.println();
System.out.println(a == 13 && b++ == 15);
System.out.println("a = " +a);
System.out.println("b = " + b);
}
}
public static void main(String args[]){
int a=10, b=15;
System.out.println("a = " + a);
System.out.println("a++ = " + a++);
System.out.println("a = " + a);
System.out.println("++a = " + ++a);
System.out.println();
System.out.println("b = " + b);
System.out.println(a ==13 && b++ == 15);
System.out.println("a = " + a);
System.out.println("b = " + b);
System.out.println();
System.out.println(a == 13 && b++ == 15);
System.out.println("a = " +a);
System.out.println("b = " + b);
}
}
Tidak ada komentar