Information générale
Titre:
Assigning an array to another array
I have following:
public int [] my_array = [1,2,3,4,5}
Then in a method I have
int[] my_array2
my_aary2 = my_array
But if I amend my_array subsequently, my_array2 is also amended
Anybody know why this is happening and if there is a way around it ?
Regards,
Gerard
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement