File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Programmer Certification (SCJP/OCPJP)
Increment Decrement Operators...Yet Again!!
Joined: Dec 16, 2012
Mar 18, 2013 02:32:11
I know this has been discussed umpteen times before.
But can anyone come up with an easier explanation.....preferably in layman terms to make a new bee happy!?
What and how?
James X Peterson
Whizlabs Java Support
Joined: Feb 26, 2013
Mar 18, 2013 02:51:40
Hi Naveen Haimsley,
As we have used post increment first the value of x is stored in i and the value of x is incremented. so the values of x and i are 2 ,1 respectively.
As we have used pre increment first the value of x is incremented and the that incremetned value is stored in i. so the values of x and i are 2 ,2 respectively.
Jesper de Jong
Joined: Aug 16, 2005
Mar 18, 2013 03:07:04
See our frequently asked questions page:
Post increment operator and assignment
Java Beginners FAQ
JavaRanch SCJP FAQ
The Java Tutorial
Java SE 8 API documentation
I agree. Here's the link:
subject: Increment Decrement Operators...Yet Again!!
Posting to bump up my count...
Eclipse + JBoss - some JAR files not deployed.
Text box value is not being completely filled with request attribute
The x900 effect ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014