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
Win a copy of
Android Security Essentials Live Lessons
this week in the
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 7 API documentation
- My blog about Scala
It is sorta covered in the
JavaRanch Style Guide
subject: Increment Decrement Operators...Yet Again!!
Eclipse + JBoss - some JAR files not deployed.
Posting to bump up my count...
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