Are these static methods or instance methods? Is your array global or being passed from one method to the other? Hard to determine what you are doing without seeing the code or an error.