title: Java assertions underused
body: <p>I'm wondering why the <code>assert</code> keyword is so underused in Java? I've almost never seen them used, but I think they're a great idea. I certainly much prefer the brevity of:</p>
  
  <pre><code>assert param != null : "Param cannot be null";
  </code></pre>
  
  <p>to the verbosity of:</p>
  
  <pre><code>if (param == null) {
      throw new IllegalArgumentException("Param cannot be null");
  }
  </code></pre>
  
  <p>My suspicion is that they're underused because</p>
  
  <ul>
  <li>They arrived relatively late (Java 1.4), by which time many people had already established their Java programming style/habit</li>
  <li>They are turned off at runtime by default</li>
  </ul>