Grabbing Random from ArrayList
<p>I have an ArrayList which stores 52 card objects like so:</p>

<pre><code> public class Pack

{
   private ArrayList&lt;Card&gt; cards;
   private Card RandomCard;


   public static void main(String[] args) {
    ArrayList&lt;Card&gt; cards = new ArrayList&lt;Card&gt;();

    cards.add(new Card('C','A'));
    cards.add(new Card('C','2'));
    cards.add(new Card('C','3'));
</code></pre>

<p>etc..</p>

<p>I also have this method which generates a random number to grab a random object from my ArrayList.</p>

<pre><code>public Card getRandomCard()

{
   int number = (int) (Math.random() * 52.0);
   return RandomCard;
}
</code></pre>

<p>This compiles but when I test it I get returned 'null'. I have to include this method!
Any suggestions? </p>
