What will be the output of the following code?
(a) int k=5,j=9;
k+= k++ - ++j + k;
System.out.println("k="+k);
System.out.println("j="+j);
Answers
Answered by
6
Explanation:
Therefore 20 +5 = 25 What will be the output of the following code? int k=5, j=9; k+=k++ - ++j + k; System.out.println("k="+k); System.out.println("j="+j ); ...
Answered by
6
Answer:
K=5,J=9
K+=(K++)-(++J)+K
K=K+(K++)-(++J)+K
K=5+5-10+6
K=10-10+6
K=0+6
K=6
Attachments:
Similar questions