keeping track of array taht holds object
i need to keep track of an object array datalist ,so that when i want to store the object to it i can store it to the next available element..
Rite now i make an object ptr.value(ptr is object of class with value as instance variable) to keep track of it,can i do something easy in java
Re: keeping track of array taht holds object
Store the value in an int variable. Then increment the variable each time you add an item to the array and decrement it each time you "delete" an item.