Por que system.out.println(14++) es 14 y no 15 | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
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