+ 2

Int i=10; if (i=10){System. Out.println (+i);} What will be the output?

15th Aug 2017, 3:44 AM
MAROJU PHANINDRA CHARY
MAROJU PHANINDRA CHARY - avatar
5 Respuestas
+ 3
Compile Error. "Out" -> out "Int" -> int "+i" -> ++i "i=10" -> "i == 10" If fixed, 11. Please write the code in the description, not the questions title.
15th Aug 2017, 4:04 AM
Rrestoring faith
Rrestoring faith - avatar
+ 3
Ah, well if it was just +i then it would be 10. Doesn't really do anything.
15th Aug 2017, 4:46 AM
Rrestoring faith
Rrestoring faith - avatar
+ 1
ok thanks for your information +i it's correct.
15th Aug 2017, 4:14 AM
MAROJU PHANINDRA CHARY
MAROJU PHANINDRA CHARY - avatar
+ 1
ya
15th Aug 2017, 4:47 AM
MAROJU PHANINDRA CHARY
MAROJU PHANINDRA CHARY - avatar
0
why put " + i" ? why not just " i" i see why faith thought comple error because +i does nothing becuase your adding nothing to "i" so its pointless if it was print(i+i); then you will get 20 even tho 20 is greater then 10 it still executes as is added after the Boolean.
15th Aug 2017, 8:48 AM
D_Stark
D_Stark - avatar