Java Array Swap swapArrayStr(String[] arr)

Here you can find the source of swapArrayStr(String[] arr)

Description

swap Array Str

License

Open Source License

Declaration

public static String[] swapArrayStr(String[] arr) 

Method Source Code

//package com.java2s;

public class Main {
    public static String[] swapArrayStr(String[] arr) {
        String[] ret = new String[arr.length];
        for (int i = 1; i < arr.length; i++) {
            ret[i - 1] = arr[i].trim();//from   w  w w .  j av a2 s  . c  om
        }
        ret[arr.length - 1] = arr[0];
        return ret;
    }
}

Related

  1. swap2Bytes(byte[] bytes, int offset)
  2. swap3(String[] a, int x, int y, int z)
  3. swapAll(final Object[] array)
  4. swapAndPrint(int[] arr, int m, int n)
  5. swapArray(int[] v, int i, int j)
  6. swapArrayValues(int i1, int i2, int[] indices)
  7. swapBlocks(byte[] array, int fromA, int toA, int fromB, int toB)
  8. swapByteArray(byte[] source)
  9. swapByteOrder(byte[] a)