Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Result of x++/x

843785Sep 28 2008 — edited Sep 28 2008
Iam getting the output as zero for the following code and i cannot understand why?

System.out.println(x++/x);

and also for this

System.out.println((x++/x));
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2008
Added on Sep 28 2008
5 comments
143 views