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 / ss
String s1="java";
String s2="java";
System.out.println(s1.equals(s2)); -->true
System.out.println(s1==s2); --->true
Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What is meant by tab pans?
How can you make a class serializable in java?
What does sprintf return?
Can you pass by reference in java?
What are alternatives to java serialization?
What is the benefit of using enum to declare a constant?
Define locale.
how many types of Inheritance?
Explain some best practices you would apply while using collection in java?
Why there are some null interface in java? What does it mean?
What is return data type?
Explain what is encapsulation?
What flag up means?
Difference between static synchronization vs. Instance synchronization?
What is the major advantage of external iteration over internal iteration?