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
why doesn't java run on all platforms?
What is difference between static class and singleton pattern?
When do we use synchronized blocks and advantages of using synchronized blocks?
Why can't you declare a class as protected?
What do you mean by composition in java?
What is abstract class? Explain
How you can force the garbage collection?
Explain an algorithm to find depth of a binary tree.
What is the difference between the font and fontmetrics classes in java programming?
What does the append?
What is a protected class in java?
Can we use a switch statement with strings?
Is main a keyword in java?
What happens to the Exception object after handling an exception?
What is the use of a copy constructor?