StringBuffer equals method
- From: "priyom" <priyom.sarkar@xxxxxxxxx>
- Date: 27 Nov 2006 22:52:29 -0800
Hi,
I found the following behaviour in StringBuffer and StringBuilder
equals method.
StringBuffer sb1 = new StringBuffer("ABC");
StringBuffer sb2 = new StringBuffer("ABC");//It can be any string same
as above
System.out.println(sb1.equals(sb2)); //this prints false!
Could someone please explain this behaviour.
Thanks in advance,
Priyom
.
- Follow-Ups:
- Re: StringBuffer equals method
- From: Andrew Thompson
- Re: StringBuffer equals method
- Prev by Date: Re: Giving an application a window icon in a sensible way
- Next by Date: Re: SAX and DOM query
- Previous by thread: Advice on basic jedit plugins
- Next by thread: Re: StringBuffer equals method
- Index(es):