Assignment Operators

in Hindi - Assignment Operators



not yet

Source Code :

RUNpublic class AssignmentOperators
{
public static void main(String args[])
{

int a=20,b=12;

b = a;
System.out.println("
 value of b is "+b);     
     
b += a;
System.out.println("
 value of b is "+b);     

b -= a;
System.out.println("
 value of b is "+b);

b *= a;
System.out.println("
 value of b is "+b);     
     
b /= a;
System.out.println("
 value of b is "+b);

b %= a;
System.out.println("
 value of b is "+b);

b &= a;
System.out.println("
 value of b is "+b);

b |= a;
System.out.println("
 value of b is "+b);

b ^= a;
System.out.println("
 value of b is "+b);

b <<= a;
System.out.println("
 value of b is "+b);

b >>= a;
System.out.println("
 value of b is "+b);

}
}