Showing posts with label Assignment Operators. Show all posts
Showing posts with label Assignment Operators. Show all posts

Java Assignment Operators / Chapter -9/Operator & Assignments


java assignment operatorJava Assignment  Operators


In Java, there are three assignment operators.Assignment operator always follows Right To Left Associativity.



  1. Simple Assignment



  2. Chained Assignment



  3. Compound Assignment



 

1.Simple Assignment:-
We can perform simple assignment at the time of declaration.


example:-

int a=10;

2.Chained Assignment :-
We can't  perform simple assignment at the time of declaration.


example:-
int a,b,c,d;
a=b=c=d=20;
System.out.println(a+"....."+b+"....." +c+"....."+d)

output is

Flipkart End Of Season Sale






© Copyright 2017 Javabychetan.blogspot.com