Java Array Remove removeFrom(double[] source, int idx)

Here you can find the source of removeFrom(double[] source, int idx)

Description

Remove a the item at the given index from the array.

License

Open Source License

Declaration

public static final double[] removeFrom(double[] source, int idx) 

Method Source Code

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

import java.util.Arrays;

public class Main {
    /**Remove a the item at the given index from the array.**/
    public static final double[] removeFrom(double[] source, int idx) {
        double[] rslt = Arrays.copyOf(source, source.length - 1);
        System.arraycopy(source, idx + 1, rslt, idx, source.length - idx - 1);
        return rslt;
    }//from  www  .  ja va2  s. c  o  m
}

Related

  1. removeFirst(String[] strArr)
  2. removeFirstElementFromArray(T[] array)
  3. removeFirstTwoArgs(String[] args, int startIndex)
  4. removeFlag(String[] options, String flag)
  5. removeFlagsFromArgs(String[] args)
  6. removeFromArray(String remove, String array[])
  7. removeFromArray(String[] oldArray, String stringToRemove)
  8. removeId(byte[] in, Integer id)
  9. removeIndex(String[] args, int index)