Java Examples

100+ tutorials, source code, and examples to help you develop creative and technical skills.

Use of Assignment Operators in java

Assignment_operators1.java

/* Code From Learnoset - Learn Code Online Android App.*/
/*Download Learnoset App from PlayStore to learn coding*/

//Use of Assignment Operators in java

class Assignment_operators1{
public static void main(String as[])
{
    int a = 30;
    int b = 10;
    int c = 0;

      c = a + b;
System.out.println("c = a + b = " + c );

      c += a ;
System.out.println("c += a  = " + c );

      c -= a ;
System.out.println("c -= a = " + c );

      c *= a ;
System.out.println("c *= a = " + c );

      a = 20;
      c = 25;
      c /= a ;
System.out.println("c /= a = " + c );

      a = 20;
      c = 25;
      c %= a ;
System.out.println("c %= a  = " + c );

      c <<= 2 ;
System.out.println("c <<= 2 = " + c );

      c >>= 2 ;
System.out.println("c >>= 2 = " + c );

      c >>= 2 ;
System.out.println("c >>= 2 = " + c );

      c &= a ;
System.out.println("c &= a  = " + c );

      c ^= a ;
System.out.println("c ^= a   = " + c );

      c |= a ;
System.out.println("c |= a   = " + c );
    }
}

Projects with Source Code + Video Tutorials

You can download our Java and Android Studio Projects with Source Code and Video Tutorials.

Login-&-Register-Screen-UI-Design---01
Login & Register Screen UI Design - 01
Firebase-Push-Notifications-|-Background-Notification
Firebase Push Notifications | Background Notification
Snake-game-android-studio-source-code
Snake game android studio source code

If you have any Questions or Queries
You can mail us at info.learnoset@gmail.com

Follow us to learn Coding and get in touch with new Technologies.