Here are 2 pieces of Java codes:
What do you think will be the output of right and left codes? Do you think they will be identical?
Here are 2 pieces of Java codes:
What do you think will be the output of right and left codes? Do you think they will be identical?
Yes, x in both codes will be 1
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thanks for your comment:) But the answer is negative!
The reason:
in the right code, the value of x will be changed after the first if statement.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit