A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
Java in General
Creating new Strings
Joined: Feb 12, 2010
Mar 04, 2010 21:14:30
s ="abc" // Creates one String object and one reference variable. How ?
String s = new String("abc") // Creates two objects, and one reference variable. How ?
Can someone please explain the above two comments.
Joined: May 21, 2006
Mar 04, 2010 21:26:43
This question has been asked many times. Please
A couple of threads discussing the same
Joined: Dec 17, 2009
Mar 28, 2010 11:00:48
Also this thread could be useful
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Creating new Strings
a question on creating string object.
String literal objects in String pool
when will == return true for Strings
Difference between String
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013