Compound Assignment Operators1 [Java] 복합 할당 연산자(Compound Assignment Operators)(예제) 1. CompAssignTest01.java public class CompAssignTest01{ public static void main(String[] args) { int x=100; x+=10;//x=x+10 System.out.printf("x += %d\n", x); x=100; s-=10;//x=x-10 System.out.prtinf("x -= %d\n", x); x=100; x*=10;//x=x*10 System.out.printf("x *= %d\n", x); x=100; x/=10;//x=x/10 System.out.printf("x /= %d\n", x); } } 2023. 3. 8. 이전 1 다음