Created
April 25, 2020 20:13
-
-
Save raviyasas/e752acf0cb10eb8394f9cfb79581d577 to your computer and use it in GitHub Desktop.
Swap Number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.app.interviews; | |
public class SwapNumber { | |
public static void main(String args[]) { | |
int x = 10; | |
int y = 20; | |
x = x + y; | |
y = x - y; | |
x = x - y; | |
System.out.println(x); | |
System.out.println(y); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment