There are various ways of doing this, but here's one method. It should work regardless of how you choose to represent your
cards.
Step 1: Throw all of your "cards" into an ArrayList. If you choose to represent your cards as 'int' then you'll have to wrap them (in an Integer).
Step 2: Create the holder for the shuffled cards, an ArrayList, or Vector, or array, or however you plan on maintaining the ordered cards.
Step 3: Using "Math.random()" select a random card from the first ArrayList, based on how many cards are remaining. So the the first time you'll be generating a number between 0 and 51. Call the "remove(int)" method on the ArrayList to remove the card from the list and return the card. Put that card into the collection you defined in step two.
Repeat step 3 until the first list is empty. So the second time you do step #3 you'll generate a number between 0 and 50; the third time a number between 0 and 49, etc.
When you finish the first ArrayList will be empty, and the second collection will contain all of the cards in a *random* order.