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 |
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
What is the difference between constructor and method?
What is onClassLoader in java?
why abstract class does not have object creation
What is java reflection api?
Can two objects have same hashcode?
Are arrays classes in java?
How do you declare an array in java?
What exactly is java?
What is the maximum size of array in java?
Read data from console and print in one file. That would be in C:\temp ? Thanks, Bose
3 Answers Oracle, Surya Software,
What is the synonym of string?