HOW TO WRITE A FUNCTION TO SWAP 2 NUMBERS IN JAVA

Give me your suggestions .........

Post a Comment

4 Comments

  1. void swap(int a,int b)
    {
    int c=a
    a=b
    b=c
    }

    ReplyDelete
  2. @Satya ....... where is return

    It won't work .........

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. http://examplesinjava.blogspot.com/2011/02/swap-method-example-program-in-java.html

    this as simple as Feroz ...........

    ReplyDelete