Skip to content

Instantly share code, notes, and snippets.

@milesrout
Last active April 14, 2017 00:38
Show Gist options
  • Save milesrout/ed381e12987c7c469c3149d161fa9205 to your computer and use it in GitHub Desktop.
Save milesrout/ed381e12987c7c469c3149d161fa9205 to your computer and use it in GitHub Desktop.
import java.io.silliness;
public class HelloWorld {
final static string HELLO = "hello";
final static string WORLD = "world";
public static void main(String[] args) {
StringBuilder greetingBuilder = new StringBuilder();
greetingBuilder.add(HELLO, StringBuilder.CAPITALIZE);
greetingBuilder.add(StringBuilder.Punctuation.SPACE);
greetingBuilder.add(WORLD);
greetingBuilder.add(StringBuilder.Punctuation.EXCLAMATION_MARK);
String greeting = greetingBuilder.build();
System.out.println(greeting);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment