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.
Add your comment
Voters For This Link (11)
-
screener -
bhandari4u -
RohitS5 -
suniltct -
cloudcomputingpath -
mswatcher -
Madhavraop -
marks8219 -
davaks -
martindesigno -
mtsahakis