import java.util.ArrayList;
/**
 * Problem class for the first couple problems of Project Euler
 *
 * @author Ryan Seys
 * @version 1.0
 */
public class Problems
{
  /**
   * If we list all the natural numbers below 10 that are multiples of 3 or 5,
   * we get 3, 5, 6 and 9. The sum of these multiples is 23.
   *
   * Find the sum of all the multiples of 3 or 5 below 1000.
   *
   * Answer: 233168
   */
  public static int problemOne()
  {
    int val = 3;
    int val2 = 5;
    int count = 1;
    ArrayList<Integer> used = new ArrayList<Integer>();
    while((count*val < 1000) || (count*val2 < 1000)) {
      if(count*val < 1000) {
        if(!(used.contains(Integer.valueOf("" + count*val)))) {
            used.add(Integer.valueOf("" + count*val));
        }
      }
      if(count*val2 < 1000) {
        if(!(used.contains(Integer.valueOf("" + count*val2)))) {
            used.add(Integer.valueOf("" + count*val2));
        }
      }
      count++;
    }

    int sum = 0;
    for(Integer num : used) {
        sum+=num.intValue();
    }
    return sum;
  }

  /**
   * Each new term in the Fibonacci sequence is generated by adding
   * the previous two terms. By starting with 1 and 2,
   * the first 10 terms will be:
   *
   * 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
   *
   * By considering the terms in the Fibonacci sequence whose values
   * do not exceed four million, find the sum of the even-valued terms.
   *
   * Answer: 4613732
   */
  public static int problemTwo()
  {
    int limit = 4000000;
    int val1 = 1;
    int val2 = 2;
    int sum = 0;
    int temp;
    while(val1 < limit) {
      if(val1 % 2 == 0) {
          sum+=val1;
      }
      temp = val2;
      val2 += val1;
      val1 = temp;
    }
    return sum;
  }

  /**
   * Main method to call the problems and print out solutions.
   * @param  args[] The arguments to be passed (currently useless)
   * @return void
   */
  public static void main(String args[]) {
    System.out.println("Problem 1: " + Problems.problemOne());
    System.out.println("Problem 2: " + Problems.problemTwo());
  }
}

@@ -1982,16 +1982,35 @@
 roblem 1
+ (should be 233168)
 : %22 + Pr
@@ -2064,16 +2064,36 @@
 roblem 2
+ (should be 4613732)
 : %22 + Pr

Put expected answer in print out.