The mkString() method is utilized to display all the elements of the list in a string along with a separator.
Method Definition: def mkString(sep: String): String
Return Type: It returns all the elements of the list in a string along with a separator.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.