Java Array Swap swap(long[] a, int i, int change)

Here you can find the source of swap(long[] a, int i, int change)

Description

swap

License

Apache License

Declaration

private static void swap(long[] a, int i, int change) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static void swap(long[] a, int i, int change) {
        long helper = a[i];
        a[i] = a[change];/*w  ww .j  a va 2 s.  c om*/
        a[change] = helper;
    }

    private static void swap(int[] a, int i, int change) {
        int helper = a[i];
        a[i] = a[change];
        a[change] = helper;
    }
}

Related

  1. swap(int[] array, int index0, int index1)
  2. swap(int[] array, int x, int y)
  3. swap(int[] inArray, int index1, int index2)
  4. swap(int[] integers, int positionX, int positionY)
  5. swap(int[] list, int i, int j)
  6. swap(long[] keys, double[] values, int i, int j)
  7. swap(Object aobj[], int i, int j, int k)
  8. swap(Object[] arr, int a, int b)
  9. swap(Object[] arr, int i, int j)