I got this from Complete
Java 2 Certification guide
How many objects are created in the following?
StringBuffer s1=new StringBuffer("abc");
StringBuffer s2=s1;
StringBuffer s3=new StringBuffer("abc");
Answer is 3.
explanation is : two StringBuffer objects at run time and one at comile time i.e "abc" in the string pool.
So does it mean whatever classes or constructors takes strings as arguments will create one additional object?