Java Array getDouble() 方法

2025年3月20日 | 阅读时长1分钟

Array 类的 getDouble() 方法返回指定数组对象中索引组件的值,类型为 double。

语法

参数

array - 数组

index - 索引

返回值

指定数组的索引组件的值

抛出

NullPointerException

IllegalArgumentException

ArrayIndexOutOfBoundsException -

示例 1

输出

1.9  , 2.7  , 3.9  ,

示例 2

输出

2.2
下一主题Java 数组类