java.lang.ObjectArrayUtilities
public class ArrayUtilities
A suite of utility methods for arrays
Constructor Summary | |
---|---|
ArrayUtilities()
|
Method Summary | |
---|---|
static int[] |
createRandomIntArray(int length)
Creates an array of random integer data. |
static int[] |
createSortedIntArray(int length)
Creates an array of integer data in sorted order. |
static int[] |
shuffleArray(int[] arr)
Randomly rearranges the elements in the specified array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArrayUtilities()
Method Detail |
---|
public static int[] createRandomIntArray(int length)
length
- the length of the array to create
public static int[] createSortedIntArray(int length)
length
- the length of the array to create
public static int[] shuffleArray(int[] arr)
arr
- the array to shuffle