title: What are the differences pre condition ,post condition and invariant in computer terminology
body: <p>I am reading the book <a href="http://jcip.net/" rel="noreferrer">Java Concurrency in Practice</a> and getting a little bit confused with these terms:</p>
  
  <ol>
  <li><em>Pre condition</em></li>
  <li><em>Post condition</em></li>
  <li><em>Invariants</em></li>
  </ol>
  
  <p>Can someone please explain me them (with an example, if it's possible)?</p>