Java Array Remove removeFirst(String[] array)

Here you can find the source of removeFirst(String[] array)

Description

remove First

License

Open Source License

Declaration

public static String[] removeFirst(String[] array) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static String[] removeFirst(String[] array) {
        List<String> newStrings = new ArrayList<String>();
        for (int i = 0; i + 1 < array.length; i++) {
            newStrings.add(array[i + 1]);
        }/* w  w w .  j av a 2s.c  o m*/
        return newStrings.toArray(new String[0]);
    }
}

Related

  1. removeElement(T[] array, T removeObject)
  2. removeElementInStringArray(String[] array, int index)
  3. removeEmpties(String[] array)
  4. removeEmtpyStrings(String[] strings)
  5. removeFirst(String[] args)
  6. removeFirst(String[] in)
  7. removeFirst(String[] strArr)
  8. removeFirstElementFromArray(T[] array)
  9. removeFirstTwoArgs(String[] args, int startIndex)