P
Prakash Prabhu
Hi,
Is there any performance benefit of using a String literal instead
of creating a new String Object , like , for eg :
String str1 = "Hello I am here "; //String literal
instead of
String str3 = new ("Hello I am here "); //String Object
Don't both str1 and str2 point to objects on the heap , since in Java
most of the binding is done at run time?
Thanks,
Prakash
Is there any performance benefit of using a String literal instead
of creating a new String Object , like , for eg :
String str1 = "Hello I am here "; //String literal
instead of
String str3 = new ("Hello I am here "); //String Object
Don't both str1 and str2 point to objects on the heap , since in Java
most of the binding is done at run time?
Thanks,
Prakash