Scala Iterator addString() method with a separator with example
This method is same as addString() method but here we can even include a separator between all the elements of an Iterator.
Method Definition : def addString(b: StringBuilder, sep: String): StringBuilder
Where, sep is the separator.
Return Type :It returns the elements of an iterator in the String Builder along with the separator stated.