CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS J2EE JAVA DETAILS
Question :
What is the difference between concat and append?
Category Java Interview Questions
Rating (5.0) By 20 users
Added on 5/20/2008
Views 1122
Rate it!
Answers:



Concat is used to add a string at the end of another string.But append() is used with String Buffer to append character sequence or string.When we concatinate a string with another string a new string object is created.But in case of StrinBuffer APPEND() that is not the case.



 Posted by: Daliya    

Contact Daliya  Contact Daliya

Concat is used to combined two string to produce a new object.In this method the above two string spoil to produce new string.Append is used with the StringBuffer, it have certain space the appended character are added.In this no object can spoil.



 Posted by: Dinesh    

Contact Dinesh  Contact Dinesh

concat method is for String class and it creates new String object having value as one string added at the end of another one, while append method is for StringBuffer. it updates the same StringBuffer object and its value becomes: second string appended at the end of first string.



 Posted by: Sandeep Bhardwaj    

Contact Sandeep Bhardwaj  Contact Sandeep Bhardwaj


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
What is the difference between Java and J2EE? Is J2EE advanced version of Java?
View Answer
How do u create objects at runtime?
View Answer
What is a string Handling? How to use it? what is difference b/w Event handling?
View Answer
What is multi threading ?
View Answer
What are the main differences between
jdk1.4 n jdk1.5?
View Answer
Given A = 1, B = 2, C = 3, D = 4 ?? Z = 26, write a java standalone
program to encode the word ?TELEPHONE? into numbers.
View Answer
Write a java standalone program / method to take out all the special
characters in the string provided below.
//ASCII a ? z (97 ? 122)
String sSENTENCE = ?This!is^a$t*e)s|t?;
View Answer
Why pointers are not used in java?
View Answer
What is super class of an Exception class?
View Answer
What is super class of an Exception class?
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL Java Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/15168/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

1.19