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
    Posts
  • #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?

    #6590

    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.