Here you can find the source of swap(String a[], int i, int j)
Parameter | Description |
---|---|
a | an array of <code>String</code>. |
i | the index of the first element. |
j | the index of the second element. |
static private void swap(String a[], int i, int j)
//package com.java2s; public class Main { /**// ww w . j a va2 s .c o m * Private method to swap two elements in the array * @param a an array of <code>String</code>. * @param i the index of the first element. * @param j the index of the second element. */ static private void swap(String a[], int i, int j) { String T; T = a[i]; a[i] = a[j]; a[j] = T; } }