This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Create a Random object, which is your random number generator, and call its nextInt() method.
The Math.abs() method keeps your random numbers in the positive range.
The '%' (Modulo) will help you constrain the range of random numbers, such as to the length of an array.
You need the array length for random number generation. You need a way to copy values to a new temporary array so you don't mess with the original.
Also, Somehow keep track of which ones you've already moved so your application doesn't copy two or more values from the array or you loose some.
If you have an object array you can skip all the double checking. Just copy your array into the method argument, then into the Vector using its copyInto(Object anArray) method, then keep calling, size() (for the Modulo), and elementAt(int index) (to move this object into the temp. array), and removeElementAt(int index) to lower the size of the Vector.
Keep doing randoms to the Vector until its empty, then you know your Temp array is ready to replace the original.