Redeclaring all the value of an array.
in
Programming Questions
•
1 year ago
I am wondering if there is any way to declare all the values of an array e.g:
int[] myArray = {4, 3, 0, 9};
but AFTER the array has already been declared an had values attached to it, i know you can do this:
myArray[0] = 5;
myArray[1] = 3;
myArray[2] = 4;
myArray[3] = 7;
but is there a way to do
myArray = {5, 3, 4, 7};
if there is not whats the closest i can get to this.
thanks in advance!
1