C Update Array Length Java