I know code snippet-1 is poor coding quality, best practice is code snippet-2.
But does it decrease performance in code snippet-1 ?
Is there any performance between these two snippets ? If yes, then how ?
Snippet-1
StringBuffer strBuffer = new StringBuffer();
strBuffer.append("Text line 1");
strBuffer.append("Text line 2");
strBuffer.append("Text line 3");
strBuffer.append("Text line 4");
strBuffer.append("Text line 5");
Snippet-2
StringBuffer strBuffer = new StringBuffer();
strBuffer.append("Text line 1")
.append("Text line 2")
.append("Text line 3")
.append("Text line 4")
.append("Text line 5");