The have read the Java Tutorial on Arrays and gather that you can initialise an array as follows:
int[] secitnum = {0,0,0,0,0};
But it is not immediately clear how to reset it back to {0,0,0,0,0} after it has changed to say {5,3,0,0,0} (in the course of running a program) without looping through and resetting each element individually as follows:
for(int i=0; i<5; i++){
secitnum[i] = 0;
}
This seems rather longwinded. I'd like to write:
secitum = {0,0,0,0,0}
but it won't compile. Is there an expression like this which will do the job, or is looping the only option?