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 |
Variables used in a switch statement can be used with which datatypes?
What is logical variable?
How do you escape sequences in java?
Why Static variable required in java?For ex,class A { static int a; int b; } Why static is required?
What is boolean in java?
What is difference overloading and overriding?
What is connection class in java?
What is member in java?
What is the exception hierarchy in java?
Write a program to print count of empty strings in java 8?
Tell me the Importent classes in net package?
Enlist few advantages of inheritance?