title: Variable expected error
body: <p>I am trying to make a bot that selects a random joke from an array list, but I seem to get an error that says:</p>
  
  <blockquote>
    <p>Variable expected</p>
  </blockquote>
  
  <p>My code so far is:</p>
  
  <pre><code>package com.delta.objects;
  
  import java.util.ArrayList;
  
  /**
   * Created by WILLIAM on 8/3/2015.
   */
  public class JokeBot extends Bot {
  
      public ArrayList&lt;Joke&gt; jokesIKnow = null;
  
      public JokeBot(ArrayList&lt;Joke&gt; jokesIKnow) {
          this.jokesIKnow = jokesIKnow;
      }
  
      public void tellJoke(){
  
          Double randomNumDouble = new Double(Math.random() = jokesIKnow.size());
          int randomNum = randomNumDouble.intValue();
  
  
      }
  
      protected void sayJoke(Joke aJoke){
          talk(aJoke.getJokeSetup());
          talk(aJoke.getJokePunchline());
      }
  }
  </code></pre>
  
  <p>the error comes up for:</p>
  
  <pre><code>Double randomNumDouble = new Double(Math.random() = jokesIKnow.size());
  </code></pre>