convert list of strings to array of strings java