'text' method in 'TagAnalysis' code

Viewing 1 reply thread
  • Author
    Posts
    • #6586
      DataFlair TeamDataFlair Team
      Spectator

      SOA program named ‘TagAnalysis’ contains the below line

      val edDate = format.parse(data._2.text)

      Is the method ‘text’ just a replacement for toString()? Is there any difference between the two methods?

    • #6587
      DataFlair TeamDataFlair Team
      Spectator

      In this example data._2 is returning a Seq[Node]. Now to get the value from the Seq, we have called the text method.
      It is not the replacement of toString()

Viewing 1 reply thread
  • You must be logged in to reply to this topic.