title: What does the "assert" keyword do?
body: <p>What does <code>assert</code> do?
  For example in the function:</p>
  
  <pre><code>private static int charAt(String s, int d) {
      assert d &gt;= 0 &amp;&amp; d &lt;= s.length();
      if (d == s.length()) return -1;
      return s.charAt(d);
  }
  </code></pre>