posted 23 years ago
Payal,
Please note that all the String methods like toUpperCase(),substring(),concat(),etc. would produce a new String if and only if the operation results into a new String literal.
In your example, "String".replace('t','t') will not produce a new String literal and hence it would be pointing to the same reference as "String".Thus you would get "Equal" as output.
Hope this helps,
Sandeep
SCJP2, OCSD(Oracle JDeveloper), OCED(Oracle Internet Platform)