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.
Answers were Sorted based on User's Feedback
Answer / 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 |
What is the Concept of Encapsulation in OOPS
What is abstraction in java?
0 Answers Akamai Technologies,
Does a function need a return?
Is string a keyword in java?
what is default constructor and parameterised constructor with example?
What are the Main functions of Java?
0 Answers Akamai Technologies,
What is string syntax?
What does java edition mean?
What is the destroy method?
What is thread safe in java?
Can a class be declared as protected?
what is synchronization