public class assignment_operators { public static void main(String[] args) { // declare variables int x = 10; int y = 5; int z = 3; System.out.println("x = "+x+", y = "+y+", z = "+z); y += x; // could be rewritten as y = y+x; z *= x; // could be rewritten as z = z*x; x++; // could be rewritten as x=x+1; System.out.println("Now x = "+x+", y = "+y+", z = "+z); x--; // could be rewritten as x = x-1; y *= x; // could be rewritten as y = y*x; z %= x; // could be rewritten as z = z%x; System.out.println("And now x = "+x+", y = "+y+", z = "+z); System.exit(0); } }