W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 2000

RE: Handling Client-Side Cookies

From: Danny Ayers <danny@panlanka.net>
Date: Wed, 13 Dec 2000 20:36:14 +0600
To: "John Philip Anderson" <jpanderson_215@hotmail.com>, <cwturner@cycom.co.uk>
Cc: <www-jigsaw@w3.org>
Message-ID: <EBEPLGMHCDOJJJPCFHEFOEOOCEAA.danny@panlanka.net>


class Inc{

public static void main(String args[]){

	int a1, b1, a2, b2;

	a1 = 0; a2 =0;

	b1 = ++a1;
	b2 = a2++;

	System.out.println(a1+" "+b1);
	System.out.println(a2+" "+b2);
	}
}

Output is :
1	1
1	0

pre-increment (++a) is done before the operation, post-increment (a++)
after.

Java is fundamentally flawed in doing what it says it will, rather than the
opposite ;-)
Received on Wednesday, 13 December 2000 09:36:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:34 GMT