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 restrictions are placed on method overriding?
What is a boolean in java?
Can we have this () and super () together?
What are pass by reference and pass by value?
What are the differences between checked exception and unchecked exception?
Explain about abstract classes in java?
Is java hashset ordered?
Give an example of use of pointers in java class.
What is the difference between abstract classes and interfaces?
What is the difference between final, finally and finalize()?
Are constructors methods?
How is tree Mirroring implemented?
What data type is true or false?
Can a string be null?
What are advantages of using Java?s layout managers than windowing systems?