Java EE 6 - Why do I need default constructor and how to define optional parameters?
<p>I'm trying to learn Java and I've got everything setup and I'm running. I created a constructor for my first model and went to setup a constructor function that accepts a parameter. I added this function:</p>

<pre><code>public Guest(String name) {
    this.name = name;
    this.signingDate = new Date(System.currentTimeMillis());
}
</code></pre>

<p>Netbeans threw an error saying I needed a default constructor.  The error went away when I changed it to:</p>

<pre><code>public Guest() {
}

public Guest(String name) {
    this.name = name;
    this.signingDate = new Date(System.currentTimeMillis());
}
</code></pre>

<p>I can't imagine that this is how you create optional parameters within Java.  So it brings up 2 questions: </p>

<ol>
<li>Why do I need a default constructor?</li>
<li>How do I create optional parameters?</li>
</ol>
