On Apr 22, 10:58 am, CIA <[email protected]> wrote:
> public static void main(String[] args) {
>         int a = 8;
>         int b = 5;
>         System.out.println("Before: a = " + a + ", b = " + b);
>         swap(a, b);
>         System.out.println("After: a = " + a + ", b = " + b);        
>
> }
>
> Both After and Before, a = 8, b = 5
>
> Can anyone help me to create *swap* method to solve my problem?
Please, read this thread, it explains the method for any class:

http://groups.google.com/group/javaprogrammingwithpassion/browse_thread/thread/2d1ecc1f11de0977/7624f3af03109605?hl=en&lnk=gst&q=swap#7624f3af03109605

(caution: the mail breaks the url, it is a oneline url).
> Thanks! :)
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to