Java New Array With Condition