Skip to content

Instantly share code, notes, and snippets.

@r3dm1ke
Created January 28, 2020 18:17
Show Gist options
  • Select an option

  • Save r3dm1ke/205e6c763f187fd53a188e8f0f8cd391 to your computer and use it in GitHub Desktop.

Select an option

Save r3dm1ke/205e6c763f187fd53a188e8f0f8cd391 to your computer and use it in GitHub Desktop.
StringBuilder example
class Main {
public static void main(String[] args) {
StringBuilder sb = new StringBuilder();
String info =
sb.append("Version: ")
.append(VersionSignleton.getVersion())
.append(" running on: ")
.append(System.getProperty("os.arch"))
.toString();
System.out.println(info);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment