Scala Mutable SortedMap addString() method with a separator with example
This method is identical to the addString() method but here a separator is also included.
Method Definition: def addString(b: StringBuilder, sep: String): StringBuilder
Where, sep is the separator stated.
Return Type: It returns the elements of the SortedMap in the String Builder and a separator is also added between the elements of the SortedMap.
cs -> 2_for -> 3_geeks -> 5
for -> 3_geeks -> 2
So, here the identical keys are removed.
My Personal Notes arrow_drop_up
Please Login to comment...