Aaronf8 Aaronf8 -4 years ago 119
Java Question

Compare 2d array in java

I am looking for an easy way to check if two 2D arrays have the exact same contents. The ideal situation would be to not use any for loops, but if thats the only possible way so be it. Thanks for the help!

Answer Source

Consider using Arrays.deepEquals. :-)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download