title: I'm getting the error "returns void, a return keyword must not be followed by an object expression"
body: <p>I have highlighted the code below which is giving me this error. What I want to do is if the value of <code>nserved</code> is less than or equal to 4 then return the value however if it is more than 4 then it defaults the value to 0.</p>
  
  <p>P.S. I've not long started programming and I'm trying to keep my code as simple as possible. Thank you for your help.</p>
  
  <pre><code>public class FoodItem
  {
      private String Name;
      private String Description;
      private int NumberServed;
      private double Cost;
  
      public FoodItem(String fname, String fdescription, int nserved, double fcost)
      {
          Name = fname;
          Description = fdescription;
          NumberServed = nserved;
          Cost = fcost;
      }
  
       public string getFoodName()
       {
           return Name;
       }
  
       public void setFoodName(string fname)
       {
           Name = fname;
       }
  
       public string getFoodDescription()
       {
           return Description;
       }
  
       public void setFoodDescription(string fdescription)
       {
           Description = fdescription;
       }
  
       public int getNumberPeople()
       {
           return NumberServed;
       }
  
       public void setNumberPeople(int nserved)
       {
           NumberServed = nserved;
  
           // Checks to see if the maximum number of people has been exceeded.
           if (nserved &lt;= 4)
           {
               return nserved;
           }
           else
           {
               return 0;
           }
       }
  
       public double getFoodCost()
       {
           return Cost;
       }
  
       public void setFoodCost(double fcost)
       {
           Cost = fcost;
       }
  }
  </code></pre>