Skip to content

Instantly share code, notes, and snippets.

@phil-lopreiato
Created September 7, 2016 13:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phil-lopreiato/f357d31d25fa46e32292a2229289843d to your computer and use it in GitHub Desktop.
Save phil-lopreiato/f357d31d25fa46e32292a2229289843d to your computer and use it in GitHub Desktop.
public class BasicOperations
{
public static void main(String[] args)
{
int x1 = 10, x2 = 10;
int y = 3 + (--x1);
int z = 3 + (x2--);
System.out.println("Result y = " + y);
System.out.println("Result z = " + z);
x1 += 9;
x1++;
System.out.println("Result x1 = " + x1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment