You can use google-guava's Joiner class to join strings.