This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Java in General and the fly likes equals method with stringbuffer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "equals method with stringbuffer" Watch "equals method with stringbuffer" New topic

equals method with stringbuffer

mukesh pandey

Joined: Apr 02, 2010
Posts: 22
StringBuffer sb1 = new StringBuffer("Amit");
StringBuffer sb2 = new StringBuffer("Amit");


sb1.equals(sb2) = false ?


String s1 = new String("Amit");
String s2 = new String("Amit");

s1.equals(s2) = true
Vinoth Kumar Kannan
Ranch Hand

Joined: Aug 19, 2009
Posts: 276

A search in this forum would have helped. We had this topic discussed recently.
Please search before posting a question..

jQuery in Action, 3rd edition
subject: equals method with stringbuffer
It's not a secret anymore!