String s = ""; s = s + "a" + "b"; The above code would be rendered as something similar to the following by the Java compiler: String s = ""; s = new StringBuffer("").append("a").append("b").toString();