Created
April 2, 2015 08:50
-
-
Save rightfold/bc7f9cb5f1191bce6a73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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