This is correct to compare hash codes rather than pointers to String class:
if (arr[i].equals(arr[j])) ...;
Alternatively you can use HashSet<string> in java.util.* due to performance issues, as your algorithm is quadratic, it can be replaced with linear version O(n):
import java.util.HashSet;
...
HashSet<String> strings = new HashSet<>();
for (int i = 0; i < arr.length; ++i) {
if (strings.contains(arr[i])) {
System.out.println("Duplicate found: " + arr[i]);
}
strings.add(arr[i]);
}