Can a String be converted into StringBuffer or StringBuilder? If Yes how, and if No why. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Can a String be converted into StringBuffer or StringBuilder? If Yes how, and if No why.

16th Dec 2018, 5:56 PM
MusabYK
MusabYK - avatar
3 Answers
+ 6
Before asking a question on the Q/A, try to search :  • Google Advanced Search : Set domain to 》sololearn.com《 for  search only on the SoloLearn https://www.google.com/advanced_search   • Eclipse Wiki : "Before asking a question on the forums" https://wiki.eclipse.org/Before_asking_a_question_on_the_forums https://code.sololearn.com/cL45oPDKApLU/?ref=app
16th Dec 2018, 7:56 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 4
I have no idea, but thanks.
16th Dec 2018, 8:57 PM
MusabYK
MusabYK - avatar
+ 2
Yes it can be //Consider the following example String s1 ="hello"; StringBuilder s2 = new StringBuilder(s1); StringBuffer s3 = new StringBuffer(s1);
16th Dec 2018, 6:02 PM
Rishi Anand
Rishi Anand - avatar