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
How do you start a thread?
Explain the difference between abstraction and encapsulation.
Explain different types of thread priorities ?
Is overriding possible in java?
What is the use of static class?
What is the purpose of assert keyword used in jdk1.4.x?
What are the main differences between the java platform and other platforms?
Why unicode is important?
What is the use of singleton class?
What is assembly used for?
What is the difference between the font and fontmetrics classes in java programming?
What is boolean example?
How does multithreading take place on a computer with a single cpu?
How do you sing an Applet ?
Why constructor has no return type?