/******************************************************************************
Online Java Compiler.
Code, Compile, Run and Debug java program online.
Write your code in this editor and press "Run" button to execute it.
*******************************************************************************/
public class Main
{
public static void main(String[] args) {
int x;
int y;
x = 1;
y = x + x++;
System.out.println("y = x + x++\ny: " + y);
x = 1;
y = ++x + x;
System.out.println("y = ++x + x\ny: " + y);
x = 1;
y = x++ + x;
System.out.println("y = x++ + x\ny: " + y);
x = 1;
y = x + ++x;
System.out.println("y = x + ++x\ny: " + y);
x = 1;
x = x + ++x - x--;
System.out.println("x = x + ++x - x--\nx: " + x);
x = 1;
x = x + x++ - x--;
System.out.println("x = x + x++ - x--\nx: " + x);
}
}