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


Please Help Members By Posting Answers For Below Questions

How do you check if a string is lexicographically in java?

494


How large is a boolean?

549


Why is java called the platform independent programming language?

568


Is java a utf 8 string?

524


What is a bufferedreader?

520






how its run?

561


What happens if an exception is not handled in a program?

620


Is the empty set a singleton?

535


Is it safe to install java on my computer?

532


What is a concrete classes? Is Java object class is concrete class?

504


When do you get classcastexception?

544


Are registers volatile?

525


Which class represents the socket that both the client and server use to communicate with each other?

565


Is binary a low level language?

493


Write an algorithm for quick sort?

612