i am learning to code and am programming with object arrays at the moment.
My problem now: I want to add objects after the last stored object in my array when i push a button. cdarray.length-1 sets the value in the numberfield which holds my arrayid to 99. Thats not what i want. it should begin at 0 because thats, where i want to begin to add objects.
Can anyone help me ? :P
Would be nice
CD[] cdarray = new CD[100];
nf_objektID.setInt(cdarray.length-1);
cdarray[cdarray.length-1] = new CD();