In java String can be created in 2 ways given below
String foo="Test";
String fooobj=new String("Test");
Everywhere it is mentioned about difference between these 2 ways of creating String. I want to know more about What are appropriate scenario's ,
where we should go for
String foo="Test";
And when to go for
String fooobj=new String("Test"); ?
No comments:
Post a Comment