Created
November 14, 2017 10:18
-
-
Save sriniind19/fa9ebb80fd505e30ff6b8e7be3f847f8 to your computer and use it in GitHub Desktop.
Swapping 2 given numbers
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
public class SwapNumbers { | |
public void doNumSwapping(Integer a, Integer b) { | |
a = a + b; | |
b = a - b; | |
a = a- b; | |
system.debug('a value: '+a); | |
system.debug('b value: '+b); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment