About Question com.enthuware.ets.scjp.v6.2.286 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
borkutip
Posts: 11
Joined: Sat Mar 08, 2014 1:20 am
Contact:

About Question com.enthuware.ets.scjp.v6.2.286 :

Post by borkutip »

Hello,
There is a typo in the explanation:

1. i = ++j; is not same as i = j++; In the case of i = ++j, j is first incremented and then compared with i. While in the case of i = j++;, j is first compared with i and then incremented.

I think, that '=' should be changed to '==', at least because of the text: '... and then compared...'.

However, I think, that the explanation is a bit vague, I mean, probably this is not the explanation for this question, because there is no 'i = ++j' or similar in the question.

Probably this would be a better explanation:

1. i++ == 0 is not the same as ++i == 0. In case of i++ == 0, i is compared first with zero, then incremented. While in the case of ++i == 0, i first incremented, then the incremented value is compared with zero.

admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question com.enthuware.ets.scjp.v6.2.286 :

Post by admin »

You are right. Explanation has now been improved.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests