All methods of the Array class are parsed

In Java, java.lang.Arrayclasses contain static methods for manipulating arrays. The following is Arrayan analysis of all methods in the class:

  1. public static Object get(Object array, int index): Get the element value at the specified array index.

  2. public static boolean getBoolean(Object array, int index): Gets the element value at the specified Boolean array index.

  3. public static byte getByte(Object array, int index): Get the element value at the specified byte array index.

  4. public static char getChar(Object array, int index): Get the element value at the specified character array index.

  5. public static short getShort(Object array, int index): Gets the element value at the specified short integer array index.

  6. public static int getInt(Object array, int index): Get the element value at the specified integer array index.

  7. public static long getLong(Object array, int index): Gets the element value at the specified long integer array index.

  8. public static float getFloat(Object array, int index): Get the element value at the specified single-precision floating-point array index.

  9. public static double getDouble(Object array, int index): Gets the element value at the specified double-precision floating-point array index.

  10. public static void set(Object array, int index, Object value): Sets the element value at the specified array index.

  11. public static void setBoolean(Object array, int index, boolean value): Sets the element value at the specified Boolean array index.

  12. public static void setByte(Object array, int index, byte value): Sets the element value at the specified byte array index.

  13. public static void setChar(Object array, int index, char value): Sets the element value at the specified character array index.

  14. public static void setShort(Object array, int index, short value): Sets the element value at the specified short integer array index.

  15. public static void setInt(Object array, int index, int value): Sets the element value at the specified integer array index.

  16. public static void setLong(Object array, int index, long value): Sets the element value at the specified long array index.

  17. public static void setFloat(Object array, int index, float value): Sets the element value at the specified single-precision floating-point array index.

  18. public static void setDouble(Object array, int index, double value): Sets the element value at the specified double-precision floating-point array index.

  19. public static int getLength(Object array): Get the length of the specified array.

  20. public static Object newInstance(Class<?> componentType, int length): Creates a new array of the specified type and length.

  21. public static Object newInstance(Class<?> componentType, int... dimensions): Creates a new array with the specified type and dimensions.

  22. public static void fill(Object[] a, Object val): Fills the entire array or elements within the specified range with the specified value.

  23. public static void fill(Object[] a, int fromIndex, int toIndex, Object val): Fill the elements in the specified range of the array with the specified value.

  24. public static void sort(Object[] a): Sort the array.

  25. public static void sort(Object[] a, int fromIndex, int toIndex): Sort the elements within the specified range of the array.

  26. public static String toString(Object[] a): Returns the contents of the array as a string.

Guess you like

Origin blog.csdn.net/monicateacat/article/details/132856103