I have a StringBuilder a. I have to append a's content to StringBuilder b. If b is null, then assign b=a, otherwise b.append(a.toString()).
Is there any performance difference on checking if the StringBuilder is null or not?
method_a(StringBuilder a, StringBuilder b) {
if (b != null) {
b.append(a.toString();
} else {
b=a;
}
}