Home arrow static arrow Java Programming [Archive] - Difference between i++ and ++i.?
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Difference between i++ and ++i.?
This topic has 2 replies on 1 page.

Posts:754
Registered: 6/13/03
Difference between i++ and ++i.?   
Jul 6, 2004 6:54 AM



 
Folks

I need some help please.

What is the difference between i++ and ++i?

I am just a bit confused

If int i = 0;

then what exactly will i++ and ++i do?
 

Posts:4,496
Registered: 19/06/02
Re: Difference between i++ and ++i.?   
Jul 6, 2004 7:05 AM (reply 1 of 2)



 
Do a search for the words postfix and prefix.
 

Posts:24,036
Registered: 2/3/03
Re: Difference between i++ and ++i.?   
Jul 6, 2004 7:24 AM (reply 2 of 2)



 
[url=http://java.sun.com/docs/books/tutorial/java/nutsandbolts/arithmetic.html]Arithmetic Operators[/url]

http://java.sun.com/docs/books/tutorial/
http://java.sun.com/developer/onlineTraining/Programming/BasicJava1/compile.html
http://java.sun.com/learning/new2java/index.html
http://javaalmanac.com
http://www.jguru.com
http://www.javaranch.com
Bruce Eckel's [url=http://mindview.net/Books/DownloadSites]Thinking in Java[/url]
Joshua Bloch's [url=http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh]Effective Java[/url]
Bert Bates and Kathy Sierra's [url=http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance]Head First Java[/url]
 
This topic has 2 replies on 1 page.