title: Unable to return variable. "java: cannot find variable"
body: <p>The goal is to find the largest numerical palindrome created by multiplying two three digit numbers. </p>
  
  <pre><code>public static void main (String[]args)
  {
      ArrayList&lt;Integer&gt; answers = new ArrayList&lt;Integer&gt;();
      int temp = 0;
      int result = 0;
      for (int i = 100; i &lt;= 999; i++){
          for (int z = 100; z &lt;= 999; z++){
              int prod = i * z;
              result = pal(prod);
              answers.add(result);
          }
      }
      int answer = Collections.max(answers);
      System.out.println(answer);
  }
  
  public static int pal(int n){
      String temp2 = String.valueOf(n);
      for (int i = 0; i &lt; temp2.length()/2; i++){
          if (temp2.charAt(i) != temp2.charAt(temp2.length()-1-i)) {
              int palindrome = Integer.parseInt(temp2);
              return palindrome;
          }
      }
      return palindrome;
  }
  }
  </code></pre>