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
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
String and StringBuffer
jose chiramal
Ranch Hand
Posts: 266
posted 13 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 13 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 13 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
Don't get me started about those stupid
light bulbs
.
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...