torsdag 31 maj 2012

++, post and pre increment

++ is a method and it returns something.

x ++; is called post increment and it adds 1 after the value is returned.

++x; is called pre  increment and adds 1 and then returns the new value.