This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes how to compare the value inside StringBuffer and String? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "how to compare the value inside StringBuffer and String? " Watch "how to compare the value inside StringBuffer and String? " New topic
Author

how to compare the value inside StringBuffer and String?

Johnson David
Greenhorn

Joined: May 22, 2005
Posts: 27
What is the procedure to compare a value inside a StringBuffer and a String
objects ?



thanx
johnson david
Timmy Marks
Ranch Hand

Joined: Dec 01, 2003
Posts: 226
use StringBuffer's toString() method and compare 2 Strings (use the equals() method)
Johnson David
Greenhorn

Joined: May 22, 2005
Posts: 27
Thanx Timmy Marks , for ur immediate response
 
GeeCON Prague 2014
 
subject: how to compare the value inside StringBuffer and String?