Eclipse sports a really nice Quick Fix that turns string concatenations into the recommended calls to StringBuilder. It saves you the time of creating a variable, having to pull out each of the string parts into a call to StringBuilder’s append and then using the string with toString().
So with one key, it will turn code like this:
System.out.println("The year " + year + " is a leap year.");
Into this:
StringBuilder message = new StringBuilder(); message.append("The year "); message.append(year); message.append(" is a leap year."); System.out.println(message.toString());