public class ExOperator1 {
public static void main(String[] args) {
int x = 10;
int y = 10;
//変数xの値を1増加させた後、変数answerXに代入を行う。
int answerX = ++x; //@
//変数yを変数answerYに代入した後、変数yの値を1増加させる。
int answerY = y++; //A
System.out.println(answerX + " : " + x); //B
System.out.println(answerY + " : " + y); //C
}
} |