title: API and declaration of functions/classes in Java
body: <p>I'm reading the first chapter of <em>Algorithm</em> (and the first two chapters of <em>Introduction to Programming in Java</em>) by Sedgewick and Wayne. I don't understand what an API means. The following is an excerpt from the book:</p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/Vp9DI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Vp9DI.png" alt="enter image description here"></a></p>
  </blockquote>
  
  <p>An example is given as follows:  </p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/AMVCA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AMVCA.png" alt="enter image description here"></a></p>
  </blockquote>
  
  <p>Here are my <strong>questions</strong>:</p>
  
  <ul>
  <li>Is an API part of the Java codes?</li>
  <li>How is an API different from declaration of functions/classes?</li>
  </ul>