File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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..

I agree. Here's the link:
subject: equals method with stringbuffer
It's not a secret anymore!