Page 39 - CTS - CSA TP - Volume 2
P. 39
COMPUTER SOFTWARE APPLICATION - CITS
TASK 13: Java Assignment Operator Example
public class OperatorExample13{
public static void main(String[] args){
int a=10;
a+=3;//10+3
System.out.println(a);
a-=4;//13-4
System.out.println(a);
a*=2;//9*2
System.out.println(a);
a/=2;//18/2
System.out.println(a);
}}
Output:
24
CITS : IT & ITES - Computer Software Application - Exercise 82