Link Details

Link 901359 thumbnail
User 884233 avatar

By screener
via javarevisited.blogspot.com.au
Published: Jan 07 2013 / 00:20

Unfortunately Arrays both primitive and Object does not implement equals() method, despite Array being object, so you can not compare them either using == operator or equals() method. Thankfully java.util.Arrays class provides two ways to compare Array in Java, one using Arrays.equals() and other using deepEquals(). There is big difference between equals() and deepEquals() in Java while comparing Arrays. This article explores when to use equals and deepEquals to compare Array.
  • 11
  • 0
  • 1508
  • 1546

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Apache Hadoop
Written by: Piotr Krewski
Featured Refcardz: Top Refcardz:
  1. Play
  2. Akka
  3. Design Patterns
  4. OO JS
  5. Cont. Delivery
  1. Play
  2. Java Performance
  3. Akka
  4. REST
  5. Java