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
What do you mean by of string::valueof expression in java 8?
Which sorting algorithm is best in java?
Can a boolean be null java?
Are arrays passed by reference in java?
Explain java coding standards for constants?
What is class??
State the difference between creating string as new () and literal.
What is identifier give example?
What is an array in java?
Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.
Can we write class inside a class in java?
Is string a wrapper class?
Wha is the output from system.out.println(“hello”+null); ?
What are 3 boolean operators?
What is role of void keyword in declaring functions?