Lớp mảng Java
Lớp Java Arrays
(có trong java.util
), có các phương thức cho phép bạn thao tác với các mảng.
Phương thức mảng
Danh sách các phương thức phổ biến của Lớp Mảng có thể được tìm thấy trong bảng bên dưới:
Method | Description |
---|---|
compare() | Compares two arrays |
copyOf() | Creates a copy of an array with a new length |
deepEquals() | Compares two multidimensional arrays to check whether they are deeply equal to each other |
equals() | Checks if two arays are equal |
fill() | Fills an array with a specified value |
mismatch() | Returns the index position of the first mismatch/conflict between two arrays |
sort() | Sorts an array in ascending order |
Của cải
Property | Description |
---|---|
length | Returns the length of an array |
Thuộc tính length
là thuộc tính Java tích hợp và không thuộc lớp Mảng.