suppose string s1="rajnish";
string s2="bhaskar";
then what will be happend ?

Answer Posted / ravi jain

2 new string objects will be created in String pool area in JVM.

String are immutable that why they are stores in

different area in JVM

as in case of final variables.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between extends thread vs implements runnable in java?

534


What’s the difference between unit, integration and functional testing?

616


What does you mean in math?

539


What is string in java? String is a data type?

580


Explain implementation and how is it different from conversion?

589






Mention some features of java?

541


What is compareto () in java?

537


How do you write a conditional statement?

519


What does I ++ mean?

611


What is singleton class and how can we make a class singleton?

661


What are keywords in java?

577


What exceptions occur during serialization?

610


Define how destructors are defined in java?

588


List the interfaces which extends collection interface?

535


What are the advantages of java over cpp?

553