when i write
string s1="java";
in one program(application) and
string s2="java";
in another application
on the same jvm will both objects s2,s2 will refer to same
memory location where "java" is stored
in string pool.

Answer Posted / tj

Yes,They will refer to same memory location..

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many bytes is 255 characters?

548


What is meant by singleton class?

598


What are the three best choices for a development environment?

599


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

521


What is the use of parse function in java?

511






Explain java coding standards for methods?

601


What is dynamic array in java?

520


How dead lock situation occurs in java and how you can identify it?

540


What about static nested classes in java?

588


What invokes a thread's run() method in java programming?

565


In which language java is written?

537


What data type is string java?

535


What is getclass () getname () in java?

675


Why for each loop is used?

500


What is the method overriding?

614