I've inherited some Java code and the previous developer was appending to a StringBuffer by doing this...
StringBuffer sb = new StringBuffer();
sb.append("a").append("b").append("c").append("d");
It obviously works, but my question is... Is it good practice to code in this manner. Or should the code be more like this...
StringBuffer sb = new StringBuffer();
sb.append("a");
sb.append("b");
sb.append("c");
sb.append("d");
Is there any advantage to doing it one way or another? Or are the differences minimal?
Thanks.