I'm having trouble understanding something:

Say I create a array

private One[] array1;

and initialise it in the constructor method of my class

array1 = new One [10];

and set the values for each element in the array in the body of a loop,

for(int count = 0; count <10; count ++)
array1 = new One();

where setAlive is a method in class One which changes the values of the private variables of class One.

Now, late in the program a method that gets called , in this message I again say

public void setAliveTwo( int x)
array1 = new One();

Where setDead is also a method in class One that changes the values of class One's private variables.
Because I want to change the value of a specific object in the array.

But this does not work.

If I dont include array1 = new One(); I get a null point exception. If I do, it seems to create a new array element instead of changing the original one.

Is this what's happening? Can there be more than one array, called array1? Two objects in array1 with the same index number? I'm confused.