1).what is the difference between below examples
String s="vijay";
String s=new String("vijay");
Answer Posted / ravikiran
first one will create an object on the heap
second one will create two objects one will saved on the
heap and another will get saved on the string pool
| Is This Answer Correct ? | 0 Yes | 6 No |
Post New Answer View All Answers
What is immutable data?
java Technical questions asked by JPMC
Why is multithreading important?
Why synchronization is important?
What is a null class?
What if static is removed from main method?
What does || mean in code?
Realized?
What is a treeset class?
Is void a data type in java?
What is loop in java?
Can there be an abstract method without an abstract class?
what is deadlock? : Java thread
What do you meant by active and passive objects?
What are static initalizers in java ?