Java interview question and answers #9 JAVA output bases interview question

preview_player
Показать описание
Here we will discuss Java interview questions and answers in Hindi. this question about output of 2 statement in java

Рекомендации по теме
Комментарии
Автор

0:53
It is because at line 5
First it will print value of x as it is i.e 10
At last in the line 6
Value of x is incremented by 1 i.e 11 and at line 6
x+2 is there so the incremented value + 2 will added in the increment value of x
So the output will be C) 10, 13

_sokhal_
Автор

First line 10 because first value is assigned to variable and then happen post increment
Now the x became 11
That's why second statement print 11 + 2 = 13

Pubg-zq