Arrays.equals vs. Arrays.deepEquals #java #shorts #coding #airhacks

preview_player
Показать описание

Java used in this short: openjdk version "21" 2023-09-19 LTS

#airhacks
Рекомендации по теме
Комментарии
Автор

Arrays.equals compares each element pairs of the arrays, whereas Arrays.deepEquals works on multidimensional arrays where a[0] and b[0] corresponds to the row of the 2D arrays which points at different object reference therefore returning false, to get it true we have to do Arrays.deepEquals(a[k], b[k])

vivekravi
Автор

What the heck! That's so weird, can u provide examples of the deep equals being true?

bruhboing
Автор

Java has some terrible Array functions

aabhishek
welcome to shbcf.ru