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 append AND concat 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 "append AND concat" Watch "append AND concat" New topic
Author

append AND concat

antraarora
Ranch Hand

Joined: Jul 27, 2000
Posts: 45
What is the difference between APPEND and CONCAT in strings?
jyothi godavarthy
Ranch Hand

Joined: Jan 28, 2004
Posts: 135
append we use for StringBuffer and concat for String. hope this helps.
antraarora
Ranch Hand

Joined: Jul 27, 2000
Posts: 45
Thanks Jyothi!!! Does that mean if we use APPEND on Strings, it will give an error and if we use CONCAT for StringBuffer, it will give an error? Or will it still compile???
jyothi godavarthy
Ranch Hand

Joined: Jan 28, 2004
Posts: 135
right, append we can't use for Strings and same way concat for StringBuffer.
 
GeeCON Prague 2014
 
subject: append AND concat