title: What does "contract" of a class mean
body: <p>I am reading the book <a href="https://rads.stackoverflow.com/amzn/click/com/0321349806" rel="noreferrer" rel="nofollow noreferrer">The Java Programming Language</a>. In the chapter which explains <strong>overriding</strong> method, it says:</p>
  
  <blockquote>
    <p>Making an override method (in subclass) less accessible than it was in super class would violate the contract of the superclass ...</p>
  </blockquote>
  
  <p>The text as a whole is understandable. My only question is what is <strong>contract of the superclass</strong>? What does the <strong>contract</strong> mean for a <strong>Java</strong> class?</p>