Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes Compare Content of StringBuilder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compare Content of StringBuilder" Watch "Compare Content of StringBuilder" New topic

Compare Content of StringBuilder

Nestor Alduey

Joined: Jul 30, 2006
Posts: 26
Hi All,

How can I compare if are equals in caracters, like I compare strings, because when I use equals method it compares only the object and not the caracters.

How can I do in this case?
Henry Wong

Joined: Sep 28, 2004
Posts: 20535

I believe the way to do this is to use toString() to get the strings, and compare them.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
I agree. Here's the link:
subject: Compare Content of StringBuilder
It's not a secret anymore!