title: How do I set default values for instance variables?
body: <p>In my assignment, I'm given a <code>Food</code> class like this:</p>
  
  <blockquote>
  <pre><code>class Food {
      private String name; // name of food
      private int calPerServing; // calories per serving
      // must be &gt;= 0
      // min storage temperature // must be &gt;= 0.
      // max storage temperature // must be &lt;= 100.
      private float minTemp; private float maxTemp;
      int getCalories() {
          return calPerServing;
      }
  }
  </code></pre>
  </blockquote>
  
  <p>And I'm having trouble with this part of the assignment:</p>
  
  <blockquote>
    <p>Write a constructor method for the <code>Food</code> class, to set the default <code>name</code> to <code>"Pie"</code>, the default <code>calPerServing</code> to <code>500</code>, the default <code>minTemp</code> to <code>25</code>, and the default <code>maxTemp</code> to <code>75</code>.</p>
  </blockquote>
  
  <p>How do I set default values for <code>name</code>, <code>calPerServing</code>, etc.?</p>