Two StringBuffer instances and one String instance, as the literal value "abc" will end up in the String constant pool as a single instance.
So that makes three objects, like you said.
Also, please don't forget to QuoteYourSources (<-click): which practice exam are you using?
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Joined: Jul 20, 2012
I did not want to give the source a bad name by saying that there are lots of mistakes, but that's the truth, but not that I inserted the name of the website, the forum is not allowing me to add it because it is banned. Anyway it's tf360 and I doubt it that it is giving real questions for 1Z0-804 (some are too easy, others have mistakes in answers as well as spelling). In fact I am going to look for another one.
I desperately need suggestions for a good 1Z0-804 exam practice with correct answers, matching choice of topics and good explanations!!!