Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Eclipse Collections Categorically: Level up your programming game
this week in the
Open Source Projects
forum!
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Ron McLeod
Jeanne Boyarsky
Sheriffs:
Paul Clapham
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Java in General
String and StringBuffer
jose chiramal
Ranch Hand
Posts: 266
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
public static void main(String args[]) { String s1 = new String("abc"); String s2 = new String("abc"); StringBuffer sb1 = new StringBuffer("def"); StringBuffer sb2 = new StringBuffer("def"); System.out.println(s1.equals(s2)); System.out.println(s1==s2); System.out.println(sb1.equals(sb2)); // why does this give me false ? System.out.println(sb1==sb2); }
Joanne Neal
Rancher
Posts: 3742
16
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Did you try searching ? The same question was asked in the Beginners forum a few days ago.
Joanne
Jesper de Jong
Java Cowboy
Posts: 16084
88
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Here
; no need to discuss the exact same question all over again.
Jesper's Blog
-
Pluralsight Author Page
She'll be back. I'm just gonna wait here. With this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
string buffer
about String & StringBuffer
What would be the output?
arguments to method
Doubt in StirngBuffer
More...