Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
++a vs a++ and calculations around different variables
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int a,b=13,c; a=++b*2; // a=14*2=28 System.out.println("a="+a+", b="+b); c=a++ + b; // a=29 // b=14 // c=28+14=42 System.out.println("a="+a+", b="+b+", c="+c); b=++a + a-- - c++ - --c; // a=29 // b=(++a=30) + (a--=29 - (c++=42) - (--c=41)) so b=30+29-42-41=-24 // c=42 System.out.println("a="+a+", b="+b+", c="+c); } }
run
|
edit
|
history
|
help
0
First Unique Character in a String
Catalan number optimised
contoh 43
bookstore
Armstrong Number in Java
motifCatur
1b
3.c
생성자
2_Arpan Subba_Lincoln.java