You can use StringUtils.join for doing this