Por que system.out.println(14++) es 14 y no 15 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Por que system.out.println(14++) es 14 y no 15

10th Dec 2017, 8:54 PM
Juan M Rosas
Juan M Rosas - avatar
3 Answers
0
x = ++14 System.out.println(x); 15 y=14++ System.out.println(y) 14 In the first example the value of x is first increased and then printed. In the second example y is first printed and then increased.
10th Dec 2017, 9:17 PM
Lucien
Lucien - avatar
0
ok. entiendo, pero eso significa que entre los paréntesis de system.out.print solo imprime el primer término? y también significa que entre los paréntesis se puede colocar una operación matemática?
10th Dec 2017, 9:54 PM
Juan M Rosas
Juan M Rosas - avatar
0
Sorry I just know some basics of Spanish. I do not understand all.
11th Dec 2017, 6:40 AM
Lucien
Lucien - avatar