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.

HD-Wallpaper-App-in-Android-Studio-----------
HD Wallpaper App in Android Studio
Modern-Custom-Rate-Us-Dialog-UI-Design-in-Android-Studio
Modern Custom Rate Us Dialog UI Design in Android Studio
Online-Tic-Tac-Toe-game-Using-Firebase-Database-in-Android-Studio
Online Tic Tac Toe game Using Firebase Database in Android Studio

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.