Can aybody know How it is working? Here Join method is related to Strings or multithreading? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can aybody know How it is working? Here Join method is related to Strings or multithreading?

https://code.sololearn.com/cA54FGi8vPr6/?ref=app

14th May 2020, 6:44 PM
Sparsh Kathpal
Sparsh Kathpal - avatar
2 Answers
+ 2
It belongs to the String class and has nothing to do with threads. The String.join() takes a delimiter as the first argument and followed by a series of character sequences. Try printing this. String c = String.join(" and ",a,b); In your code you need one more argument passed to join() to see the effect of 'a'.
14th May 2020, 6:52 PM
Avinesh
Avinesh - avatar
+ 1
Thanks Avinesh Now i know the whole concept☺🙂
14th May 2020, 7:28 PM
Sparsh Kathpal
Sparsh Kathpal - avatar