"Tokens(4).toFloat" instead of "Float.parseFloat(Tokens(4))"

Viewing 1 reply thread
  • Author
    Posts
    • #6600

      In the code for Retail Data Analysis in Scala, is it ok to use “Tokens(4).toFloat” instead of “Float.parseFloat(Tokens(4))” to convert string to Float?

    • #6601

      Yes you can use Tokens(4).toFloat to convert String to Float, it is scala API for the same.

      Float.parseFloat… is the Java API.

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