Regd the String literal

Hi,I just wanted to know how many objects are created for the following piece of code.String s ="23" + "43" + "56" + "45";Regards,Rohini
[171 byte] By [rohini16a] at [2007-11-26 19:25:03]
# 1
> Hi,> > I just wanted to know how many objects are created> for the following piece of code.> > String s ="23" + "43" + "56" + "45";> > Regards,> RohiniHow many do you think?
prometheuzza at 2007-7-9 21:48:46 > top of Java-index,Java Essentials,New To Java...
# 2
i wanted to know whether for every string literal thats encountered a seperate String object is constructed and then the concatenation is performed?
rohini16a at 2007-7-9 21:48:46 > top of Java-index,Java Essentials,New To Java...
# 3
> i wanted to know whether for every string literal> thats encountered a seperate String object is> constructed and then the concatenation is performed?If they're not present in the String-pool, then: yes.
prometheuzza at 2007-7-9 21:48:46 > top of Java-index,Java Essentials,New To Java...
# 4
However compile-time expressions are evaluated at compile time, including string concatenations expressions as well.
BIJ001a at 2007-7-9 21:48:46 > top of Java-index,Java Essentials,New To Java...