Java Array Element Get get(Object[] array, int index)

Here you can find the source of get(Object[] array, int index)

Description

get

License

Apache License

Declaration

public static Object get(Object[] array, int index) 

Method Source Code

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

import java.util.List;

public class Main {
    /***********************************************************************/
    public static Object get(Object[] array, int index) {
        return getArrayLength(array) > index ? array[index] : null;
    }/*from w  w  w.j  a  va2  s. c o m*/

    /***********************************************************************/
    public static Object get(List list, int index) {
        return list == null ? null : list.get(index);
    }

    /***********************************************************************/
    public static int getArrayLength(Object[] array) {
        return array == null ? 0 : array.length;
    }
}

Related

  1. arrayElement(T[] array, int index)
  2. get(int index, final T[]... arrays)
  3. get(T[] array, int index)
  4. get(T[] array, int index)
  5. get(T[] array, int index)
  6. getAllMatches(String[] target, String[] pattern)