Skip to content

Instantly share code, notes, and snippets.

@sriniind19
Created November 14, 2017 10:18
Show Gist options
  • Save sriniind19/fa9ebb80fd505e30ff6b8e7be3f847f8 to your computer and use it in GitHub Desktop.
Save sriniind19/fa9ebb80fd505e30ff6b8e7be3f847f8 to your computer and use it in GitHub Desktop.
Swapping 2 given numbers
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