Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 937
Aaronf8 Avatar asked Apr 20 '26 22:04

Aaronf8


1 Answers

Consider using Arrays.deepEquals. :-)

like image 112
Chris Jester-Young Avatar answered Apr 23 '26 11:04

Chris Jester-Young



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!