1).what is the difference between below examples
String s="vijay";
String s=new String("vijay");
Answer Posted / karun
In first statement String s = "vijay"
Means it will create a single instance and single reference
variable
but in second statement
String s = new String("vijay");
Means it will create a two instances and single reference
variable
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
What is predicate in java?
Can an interface implement another interface?
How to create com object in Java?
What is a java applet? What is an interface?
What is queue in java?
What does java final mean?
Explain about features of local inner class?
What is the purpose of stub and skeleton?
What do you mean by stack?
What is the function of http?
How dead lock situation occurs in java and how you can identify it?
What does it mean to be immutable?
Explain about anonymous inner classes in java?
Is hashset ordered?
What are the advantages of exception handling in java?