Assignment Operator Example in java

Java Programming Language Operators in java (Article) Operators in java (Program)

1828

Program:

 class OperatorExample{
public static void main(String args[])
	{
	int a=10;
	int b=20;
	a+=4;//a=a+4 (a=10+4)
	b-=4;//b=b-4 (b=20-4)
	System.out.println(a);
	System.out.println(b);
	}
}

Output:

14
16
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.