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
Why do we need autoboxing in java?
What is wrapper class html?
What does the three dot emoji mean?
What is a key in java?
What are the 6 mandatory procedures for iso 9001?
Discuss about garbage collector in Java.
What are the features in java?
What is the relationship difference the canvas class and the graphics class?
What is the difference between ArrayList and Vector? which one is better in Java
What do you mean by constructor?
What is difference in between java class and bean?
What does flag mean in java?
can rmi and corba based applications interact ?
What is the difference between abstract classes and interfaces?
Why string is not thread safe?