code: private void checkInvariants() {
          assert(wordsInUse == 0 || words[wordsInUse - 1] != 0);
          assert(wordsInUse >= 0 && wordsInUse <= words.length);
          assert(wordsInUse == words.length || words[wordsInUse] == 0);
      }
docs: Every public method must preserve these invariants.