How equals method works in StringBuffer?
- From: swornavidhya_m@xxxxxxxxxxx
- Date: 30 Aug 2006 23:29:50 -0700
Hai,
In my following code, the output i obtained is: false. Whereas
my expectation for output is true. I need ur suggestions and ideas.
The code is as follows:
Class stringBufferEqual
{
public static void main(String args[])
{
StringBuffer s1 = new StringBuffer("Amit");
StringBuffer s2 = new StringBuffer("Amit");
System.out.println(s1.equals(s2));
}
}
Awaiting for ur suggestions and ideas in advance.
M.Sworna Vidhya
.
- Follow-Ups:
- Re: How equals method works in StringBuffer?
- From: Chris Smith
- Re: How equals method works in StringBuffer?
- Prev by Date: Re: How to edit the GUI source code?
- Next by Date: Re: How equals method works in StringBuffer?
- Previous by thread: How to get BindException reference inside my Aspect?
- Next by thread: Re: How equals method works in StringBuffer?
- Index(es):