Tracks the number of calories consumed throughout the day Tracks the number of calories a person consumes in a given meal it has helper method to get the day's total. The check method Tries to find any duplicate meals within the given list. The assumption is that a day can only contain one of each type of meal.

public class Meal {
    public enum Type {
        BREAKFAST,
        LUNCH,
        DINER,
    }

    public Type type;
    double caloriesConsumed;

    public Meal(Type type, double caloriesConsumed) {
        this.type = type;
        this.caloriesConsumed = caloriesConsumed;
    }

    //Gets calories burned
    public double getCaloriesConsumed() {
        return caloriesConsumed;
    }

    //Sets calories burned
    public void setCaloriesConsumed(double caloriesConsumed) {
        this.caloriesConsumed = caloriesConsumed;
    }

    //Get type
    public Type getType() {
        return type;
    }

    //Set type
    public void setType(Type type) {
        this.type = type;
    }

    public boolean equals(Meal meal) {
        return meal.getType() == meal.getType() &amp;&amp; meal.getCaloriesConsumed() == getCaloriesConsumed();
    }

    public static void check(Meal... meals) throws Exception {
        /**
         * Tries to find any duplicate meals within the given list.
         * The assumption is that a day can only contain one of each type of meal.
         */
        ArrayList&lt;Type&gt; types = new ArrayList&lt;Type&gt;();
        for (int i = 0; i &lt; meals.length; i++) {
            if (types.contains(meals[i].type))
            {
                throw new Exception();
            }
            else
            {
                types.add(meals[i].type);
            }
        }
    }

    public static double getTodaysCalories(Meal... meals) throws Exception
    {
        check(meals);

        double total = 0;
        for (Meal meal : meals) {
            total += meal.caloriesConsumed; //Add calories to total
        }
        return total;
    }

    public static void main(String[] args) {
        Meal breakfast = new Meal(Type.BREAKFAST, 500.7);
        Meal lunch = new Meal(Type.LUNCH, 378.9);
        Meal dinner = new Meal(Type.DINER, 620.1);

        try {
            double caloriesConsumed = Meal.getTodaysCalories(breakfast, lunch, dinner);
            System.out.println("Today's Total Calories is " + caloriesConsumed);
        } catch (Exception e) {
            System.out.println("Unable to calculate today's calories");
        }
    }
}
First, a small note. Your fields are public. There's no need for getters and setters if the fields are public.

Second, the getTodaysCalories() and check() methods seems a bit out of place in this class. I think it would be a lot better to have a 2nd class called DailyMeals. That class would then have a List&lt;Meal&gt; inside of it. That class would be the one to check if a duplicate is being added and what the daily totals are. However the checking for duplicates should be done at the time a meal is added. This would give the code more clarity and put the methods where they should be. As it stands now there isn't really any indication that a list of meals is for a single day and/or that it can't contain duplicates.

In addition, it may be some sort of rule that you can't have 2 of the same meal, but perhaps that would be better done by (instead of throwing an exception) prompting the user asking if they are sure they want to add a second lunch/dinner/breakfast etc. What happens if the person actually ate 2 meals and they consider them both lunch?

The general code structure could look something like this:

public class Meal {
    public enum Type {
        BREAKFAST,
        LUNCH,
        DINER,
    }

    private Type type;
    private double caloriesConsumed;

    public Meal(Type type, double caloriesConsumed) {
        this.type = type;
        this.caloriesConsumed = caloriesConsumed;
    }

    //ommitted getters, setters and equals for brevity...
}

public class DailyMeals {
    List&lt;Meal&gt; meals;

    //ommitted constructors for brevity...

    public void addMeal(Meal meal) {
        if (checkForDuplicate(meal))
            //throw error (or prompt if they're sure they want to add a duplicate)

        //rest of method code...
    }

    private boolean checkForDuplicates(Meal meal) {
        //code to check if multiple meals have the same type...
    }

    public int getCaloriesForDay() {
        //code returning total number of calories for the day
    }
}