Solved MergeSortedArray in java