This topic contains 1 reply, has 1 voice, and was last updated by  DataFlair Team 1 year, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #6589

    ‘mkString’ is used in place of ‘toString’ in ‘ScoreAnalysis’ program. Any particular reason to use mkString or is it just to demonstrate various functions that are used for the same purpose?


    We read a text file into an iterator.. Hence, if you perform toString(), it won’t return the contents of the file. It returns the string representation of the iterator object.
    Then, mkString() will read the iterator & loop over the values and create the String based on the values.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.