I am doing something where I have code like this
Object[] array = new Object[10];
Arrays.fill(array, new Object());
my question is, will array[0] == array[1]
be true, or just array[0].equals(array[1])
? Or in other words, are all of the values in the array the same exact object or equivalent objects?
Aucun commentaire:
Enregistrer un commentaire