File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
difference between two string object
Joined: May 29, 2008
Jul 04, 2010 23:15:07
String str = "Hello World"; String str1= new String ("hello World"); String str2 = "Hello World";
literals are identical, the compiler creates one String object for "Hello World" in the literal pool. It is then assigned to both str and str2. how refer str1 and str2 in string object?
what happened in memory ?
Please help me.
Joined: May 03, 2008
Jul 04, 2010 23:49:41
There is a
section for beginners' questions, you know.
There are no new questions, but there may be new answers.
Joined: Oct 27, 2005
Jul 05, 2010 00:58:57
Which is where I will move this thread.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
subject: difference between two string object
How does String str = "str" work?
String and StringBuffer
String is created on pool?
Comparison with NaN
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014