Java Assertions
<p>ok I need to put assertions into my java code but I can't figure out how to enable assertions in my netbeans 6.8 ide.</p>

<p>is this the only step I need to complete in order to be able to use assertions?</p>

<p>just to set this up I am creating a simple java code: </p>

<pre><code>class Main
    public static void main(String[] args) throws IOException {
      System.out.print("Enter your marital status: ");
      int c = System.in.read();
      switch ((char) c) {
         case 's':
         case 'S': System.out.println("Single"); break;
         case 'm':
         case 'M': System.out.println("Married"); break;
         case 'd':
         case 'D': System.out.println("Divorced"); break;
         default: assert !true : "Invalid Option"; break;
      }
    }
}
</code></pre>

<p>then I go to run -> set project configuration -> customize...</p>

<p>I enter in the "VM Options" box: 
-enableassertions:javaapplication58</p>

<p>as javaapplication58 is my package</p>

<p>i have used this approach because upon googling a bit it looks like what you do, but I still can't get my assert to work, please suggest or point my to a better tutorial. </p>

<p>Thanks, Lavanya</p>
