Click here to Skip to main content
15,880,725 members

Articles by GregEllis (0 articles)

RSS Feed

Average article rating:

No articles have been posted.

Average blogs rating:

No blogs have been submitted.

Average tips rating: 5.00

Programming Languages
Java
18 Feb 2012   Updated: 18 Feb 2012   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: CPOL    Views: 28,471     Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
You can do it with some XORs:int a = 25, b = 7;a = a ^ b;b = b ^ a;a = a ^ b;Or the same thing with some shorthand to make the code even harder to read:a ^= b;b ^= a;a ^= b;

Average reference rating:

No reference articles have been posted.

Average project rating:

No projects have been posted.
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.