Advertisement
Codex

Swap

Jul 1st, 2011
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.25 KB | None | 0 0
  1. /*This program swap two numbers and print them */
  2. class Swap
  3. {
  4.  void swap(int A,int B)
  5.   {
  6.      int temp=A;
  7.      A=B;
  8.      B=temp;
  9.      System.out.println("A = "+A);
  10.      System.out.print("B = "+B);
  11.      System.out.println("Program over");
  12.   }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement