【版权声明】未经博主同意,谢绝转载!(请尊重原创,博主保留追究权)
https://blog.csdn.net/m0_69908381/article/details/131734304
出自【进步*于辰的博客】
文章目录
- 1、概述
- 2、方法摘要
- 2.1 static Object get(Object array, int index)
- 2.2 static boolean getBoolean(Object array, int index)
- 2.3 static byte getByte(Object array, int index)
- 2.4 static char getChar(Object array, int index)
- 2.5 static double getDouble(Object array, int index)
- 2.6 static float getFloat(Object array, int index)
- 2.7 static int getInt(Object array, int index)
- 2.8 static int getLength(Object array)
- 2.9 static long getLong(Object array, int index)
- 2.10 static short getShort(Object array, int index)
- 2.11 static Object newInstance(Class<?> componentType, int length)
- 2.12 static Object newInstance(Class<?> componentType, int[] dimensions)
- 2.13 static void set(Object array, int index, Object value)
- 2.14 static void setBoolean(Object array, int index, boolean z)
- 2.15 static void setByte(Object array, int index, byte b)
- 2.16 static void setChar(Object array, int index, char c)
- 2.17 static void setDouble(Object array, int index, double d)
- 2.18 static void setFloat(Object array, int index, float f)
- 2.19 static void setInt(Object array, int index, int i)
- 2.20 static void setLong(Object array, int index, long l)
- 2.21 static void setShort(Object array, int index, short s)
- 最后
1、概述
继承关系:
- java.lang.Object
- java.lang.reflect.Array
public final class Array extends Object
Array 类提供了动态创建和访问 Java 数组的方法。
Array 允许在执行 get()
或 set()
操作期间进行扩展转换,但如果发生收缩转换,则抛出 IllegalArgumentException。
2、方法摘要
2.1 static Object get(Object array, int index)
返回指定数组对象中索引组件的值。
2.2 static boolean getBoolean(Object array, int index)
以 boolean 形式返回指定数组对象中索引组件的值。
2.3 static byte getByte(Object array, int index)
以 byte 形式返回指定数组对象中索引组件的值。
2.4 static char getChar(Object array, int index)
以 char 形式返回指定数组对象中索引组件的值。
2.5 static double getDouble(Object array, int index)
以 double 形式返回指定数组对象中索引组件的值。
2.6 static float getFloat(Object array, int index)
以 float 形式返回指定数组对象中索引组件的值。
2.7 static int getInt(Object array, int index)
以 int 形式返回指定数组对象中索引组件的值。
2.8 static int getLength(Object array)
以 int 形式返回指定数组对象的长度。
2.9 static long getLong(Object array, int index)
以 long 形式返回指定数组对象中索引组件的值。
2.10 static short getShort(Object array, int index)
以 short 形式返回指定数组对象中索引组件的值。
2.11 static Object newInstance(Class<?> componentType, int length)
创建一个具有指定的组件类型和长度的新数组。
2.12 static Object newInstance(Class<?> componentType, int[] dimensions)
创建一个具有指定的组件类型和维度的新数组。
2.13 static void set(Object array, int index, Object value)
将指定数组对象中索引组件的值设置为指定的新值。
2.14 static void setBoolean(Object array, int index, boolean z)
将指定数组对象中索引组件的值设置为指定的 boolean 值。
2.15 static void setByte(Object array, int index, byte b)
将指定数组对象中索引组件的值设置为指定的 byte 值。
2.16 static void setChar(Object array, int index, char c)
将指定数组对象中索引组件的值设置为指定的 char 值。
2.17 static void setDouble(Object array, int index, double d)
将指定数组对象中索引组件的值设置为指定的 double 值。
2.18 static void setFloat(Object array, int index, float f)
将指定数组对象中索引组件的值设置为指定的 float 值。
2.19 static void setInt(Object array, int index, int i)
将指定数组对象中索引组件的值设置为指定的 int 值。
2.20 static void setLong(Object array, int index, long l)
将指定数组对象中索引组件的值设置为指定的 long 值。
2.21 static void setShort(Object array, int index, short s)
将指定数组对象中索引组件的值设置为指定的 short 值。
最后
如果大家需要Java-API文档,我上传了《Java-API文档-包含5/8/11三个版本》。
本文暂缓更新。