bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/Java/Java Reference
Java•Java Reference

Java Arrays Class

The Java Arrays class (found in java.util ), has methods that allow you to manipulate arrays.

Arrays Methods

A list of popular methods of the Arrays Class can be found in the table below:

MethodDescription
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 arrays 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

Properties

PropertyDescription
lengthReturns the length of an array

The length property is a built-in Java property, and does not belong to the Arrays class.

Previous

Java Output println() Method

Next

Java Arrays. compare() Method