MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / swap

Method swap

vm/JavaAPI/src/java/util/Arrays.java:2617–2621  ·  view source on GitHub ↗

Swaps the elements at the given indices in the array. @param a - the index of one element to be swapped. @param b - the index of the other element to be swapped. @param arr - the array in which to swap elements.

(int a, int b, Object[] arr)

Source from the content-addressed store, hash-verified

2615 * the array in which to swap elements.
2616 */
2617 private static void swap(int a, int b, Object[] arr) {
2618 Object tmp = arr[a];
2619 arr[a] = arr[b];
2620 arr[b] = tmp;
2621 }
2622
2623 /**
2624 * Performs a sort on the section of the array between the given indices

Callers 1

copySwapMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected