title: What does idempotent method mean and what are the side effects in case of calling close method of java.lang.AutoCloseable?
body: <p>Java docs of close() method of java.lang.AutoCloseable says</p>
  
  <blockquote>
    <p>Note that unlike the <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html#close()" rel="noreferrer"><code>close()</code></a> method of <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html" rel="noreferrer">Closeable</a>, this <code>close()</code> method is
    not required to be <em>idempotent</em>. In other words, calling this close
    method more than once may have some visible side effect, unlike
    <code>Closeable#close()</code> which is required to have no effect if called more
    than once. However, implementers of this interface are strongly
    encouraged to make their close methods idempotent.</p>
  </blockquote>
  
  <p><br>
  What do they mean by <strong><em>idempotent</em></strong> method and what are the side effects of calling this <code>close()</code> method twice?</p>
  
  <p>And since interface <code>Closeable</code> extends <code>AutoCloseable</code> why are the side effects not to be seen in the close of <code>Closeable</code> interface?</p>