Venciity

[Java] ChangeValues

May 2nd, 2014
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1.  
  2. public class ChangeValues
  3. {
  4.  
  5.     public static void main(String[] args)
  6.     {
  7.         int a = 5;
  8.         int b = 10;
  9.        
  10.         System.out.println("a = " + a);
  11.         System.out.println("b = " + b);
  12.         System.out.println();
  13.        
  14.         int c = a;
  15.         a = b;
  16.         b = c;
  17.        
  18.         System.out.println("a = " + a);
  19.         System.out.println("b = " + b);
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment