title: find the sum of the multiples of 3 and 5 below 1000
body: <p>Ok guys, so I'm doing the Project Euler challenges and I can't believe I'm stuck on the <a href="http://projecteuler.net/problem=1" rel="noreferrer">first challenge</a>. I really can't see why I'm getting the wrong answer despite my code looking functional:</p>
  
  <pre><code>import java.util.ArrayList;
  
  
  public class Multithree {
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
  
          ArrayList&lt;Integer&gt; x = new ArrayList&lt;Integer&gt;();
          ArrayList&lt;Integer&gt; y = new ArrayList&lt;Integer&gt;();
          int totalforthree = 0;
          int totalforfive = 0;
  
          int total =0;
  
          for(int temp =0; temp &lt; 1000 ; temp++){
              if(temp % 3 == 0){
                  x.add(temp);
                  totalforthree += temp;
              }
          }
  
          for(int temp =0; temp &lt; 1000 ; temp++){
              if(temp % 5 == 0){
                  y.add(temp);
                  totalforfive += temp;
              }
          }
  
          total = totalforfive + totalforthree;
  
  
  
          System.out.println("The multiples of 3 or 5 up to 1000 are: " +total);
  
      }
  
  }
  </code></pre>
  
  <p>I'm getting the answer as 266333 and it says it's wrong...</p>