Skip to content

Instantly share code, notes, and snippets.

@amadamala
Created June 7, 2012 19:41
Show Gist options
  • Save amadamala/2891114 to your computer and use it in GitHub Desktop.
Save amadamala/2891114 to your computer and use it in GitHub Desktop.
String concatination using var args.
public static String concat(String arg, String... args) {
StringBuilder builder = new StringBuilder(arg);
for(String s:args){
builder.append(s);
}
return builder.toString();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment