Java Array.getDouble(Object array, int index)

Syntax

Array.getDouble(Object array, int index) has the following syntax.

public static double getDouble(Object array,  int index)   
            throws IllegalArgumentException ,     
                   ArrayIndexOutOfBoundsException

Example

In the following code shows how to use Array.getDouble(Object array, int index) method.


import java.lang.reflect.Array;
/*from ww  w .ja v  a 2  s. c o m*/
public class Main {
  public static void main (String args[]) {
    double[] array = new double[]{1.1,2.2,3.3};
    
   
    double value = Array.getDouble(array, 1);

    System.out.println(value);

  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.lang.reflect »




Array
Constructor
Field
Method
Modifier
ParameterizedType
TypeVariable