Find the Duplicate Number Java