title: Java Error: The constructor is undefined
body: <p>In Java, Why am I getting this error:</p>
  
  <pre><code>Error: The constructor WeightIn() is undefined
  </code></pre>
  
  <p>Java Code:</p>
  
  <pre><code>public class WeightIn{
    private double weight;
    private double height;
  
    public WeightIn (double weightIn, double heightIn){
      weight = weightIn;
      height = heightIn;
    }
    public void setWeight(double weightIn){
      weight = weightIn;
    }
    public void setHeight(double heightIn){
      height = heightIn;
    }
  }
  
  public class WeightInApp{
    public static void main (String [] args){
      WeightIn weight1 = new WeightIn();         //Error happens here.
      weight1.setWeight(3.65);
      weight2.setHeight(1.7);
    }
  }
  </code></pre>
  
  <p>I have a constructor defined.  </p>