title: How to compare Object Arrays using Arrays.equals() in java?
body: <p>in this example showing how to do it :</p>
  
  <pre><code>Student[] stud1 = new Student[2];
  Student[] stud2 = new Student[2];
  Student[] stud3 = new Student[2];
  boolean b;
  stud1[0]= new Student("Johnny","Bravo");
  stud1[1]= new Student("Ace","Ventura");
  stud2[0]= new Student("Ash","Ketchum");
  stud2[1]= new Student("Mike","Wazowski");
  b = Arrays.equals(stud1,stud2);
  System.out.println(b);
  stud2 [0] = stud1[0];
  stud2[1] = stud1[1];
  b = Arrays.equals(stud1,stud2);
  System.out.println(b); 
  stud3 = stud1;
  b = Arrays.equals(stud1,stud3);
  System.out.println(b);
  }
  </code></pre>
  
  <p>the result is <strong>false true true</strong>. What is Arrays.equals comparing exactly?
  thanks.</p>