Skip to content

Instantly share code, notes, and snippets.

@rightfold
Created April 2, 2015 08:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rightfold/bc7f9cb5f1191bce6a73 to your computer and use it in GitHub Desktop.
Save rightfold/bc7f9cb5f1191bce6a73 to your computer and use it in GitHub Desktop.
class Builder{
String message = "";
Builder greet(string only_one){
message += "Hello "
message += only_one;
}
Builder greet(string first, string... rest){
greet(first);
message += " and "
greet(rest[0], Arrays.copyOfRange(rest, 1, rest.length - 1));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment