Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 337 Bytes

string_builder.md

File metadata and controls

19 lines (14 loc) · 337 Bytes

StringBuilder

When you add Strings together, the result is a new String.

void main() {
    String a = "a";
    String b = "b";
    String ab = a + b;

    System.out.println(ab);
}

This is perfectly fine and what you would expect, but if you are adding strings together in a loop it can become an issue.