what is meant by string pooling?
Answer Posted / sivadasan
See,
String s = new String("Shiva");
Its creating two instances and one reference.
In the Two instance one is stored in Constant pool and
another one is stored in temp' pool.
What about String s = "Shiva";
Anybody can, pls clarify...
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
what is difference between equals and ==?
What are the four versions of java?
What is the old name of java?
What is the difference between hashset and treeset in java?
What is singleton class and how can we make a class singleton?
What does the ‘static’ keyword mean? Is it possible to override private or static method in java?
What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?
What is the platform?
What is a void method?
What is a pointer and does java support pointers?
How do you sort data in java?
What is java reflection?
Can we extend singleton class in java?
What is final method?
How does a for loop work?