if your question is "how objects are created?" then the answer is when you use new keyword an instance to the String class is created in the heap.
if your question is "how many objects are created? " then the answer is 1
Anuradha<br />(SCJP 1.4)
posted 11 years ago
Anu check this out: new String("abc") == "abc" returns false. So a new object is created which is different to the object "abc" residing in the string pool. So if this is the first time "abc" is used, then you could say two objects are created.