Reverse the positions of
two business objects in a business object array. Keep in mind that the
first element in the array is zero (0), the second is 1, the third
is 2, and so on.
Syntax
void swap(int index1, int index2)
Parameters
index1
The array position of one element you want to swap.
index2
The array position of the other element you want to swap.
Examples
The following example uses swap() to reverse the positions of BusObjA and BusObjC in the following
array:
swap(0,2);
The result of the call to swap() is the following array: