Karthick Ravi wrote:Guys, got this question in a bank ...
Enjoy, Chander
SCJP 5, Oracle Certified PL/SQL Developer
chander shivdasani wrote:According to me 3 objects are created in pool
String Constant Pool is nothing but Collection Of references which is pointed to an Object in Heap
SCJP 6 - SCJD - SCWCD 5 - SCBCD 5
JavaEnterpriseEditionFaq - TomcatFaq
SCJP, SCWCD, OCUP
Tomasz Stachlewski wrote:
In my opinion:
SCJP 6 - SCJD - SCWCD 5 - SCBCD 5
JavaEnterpriseEditionFaq - TomcatFaq
All string literals in Java programs, such as "abc", are implemented as instances of this class.
SCJP 6
“Everything should be as simple as it is, but not simpler.” Albert Einstein
Duc Vo wrote:
David, the first three lines will be optimised into
String str = "HelloWorld";
Hence JVM won't create String literals "Hello" nor "World".
seetharaman venkatasamy wrote:
Disagree .
“Everything should be as simple as it is, but not simpler.” Albert Einstein
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|