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
Can an interface have a constructor?
What is difference between static variable and global variable?
How we create object in copy constructor?
What happens if a constructor is declared private?
What is a parameter in a function?
How is treeset implemented in java?
What is the most important feature of java? What is an interface?
How many characters is 16 bytes?
What is unicode used for?
What invokes a thread's run() method in java programming?
Is overriding possible in java?
What is java reflection api?
How to instantiate member inner class?
Can list be null in java?
What are the types of strings?