I know that the title sounds redundant but its for a exercise, otherwise I would use an arraylist. I am sorry if this been asked before, I tried to find a solution but couldn\'t