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
  • 1404
  • 1544

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.

Spring Integration
Written by: Soby Chacko
Featured Refcardz: Top Refcardz:
  1. Search Patterns
  2. Python
  3. C++
  4. Design Patterns
  5. OO JS
  1. PhoneGap
  2. Spring Integration
  3. Regex
  4. Git
  5. Java