Answers for "swap 2 var without tmp"

0

swap variables without temp

import java.*; 
  
class noTemp { 
  
    public static void main(String a[]) 
    { 
        int x = 10; 
        int y = 5; 
        x = x + y; 
        y = x - y; 
        x = x - y; 
        System.out.println(x , y); 
    } 
}
Posted by: Guest on January-22-2021

Code answers related to "swap 2 var without tmp"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language