title: Meaning of Objects.deepEquals method
body: <p>The question is about static methods <code>Objects.deepEquals</code> class (since <code>Java 7</code>):</p>
  
  <pre><code>public static boolean deepEquals(Object a, Object b) {
      if (a == b)
          return true;
      else if (a == null || b == null)
          return false;
      else
          return Arrays.deepEquals0(a, b);
  }
  </code></pre>
  
  <p>As it said in <code>javadoc</code> of this method:</p>
  
  <blockquote>
    <p>Returns true if the arguments are deeply equal to each other and false
    otherwise.</p>
  </blockquote>
  
  <p>What I do not understand: where is the <strong>depth</strong> of comparison? As we can see inside its implementation it just does references comparison, and inside <code>Arrays.deepEquals0(a, b)</code> for simple <code>Object</code> and <code>Object</code> arguments it invokes 
  just: <code>eq = e1.equals(e2);</code>. So in what kind of sense two objects are <strong>deeply</strong> equal?</p>