Here is the example. I would like to know why I am not able to use Rounded Bracket (()
) to call the toFloat
method
This works : toFloat
scala> val no = "8.5".toFloat
no: Float = 8.5
This DO NOT work : toFloat()
scala> val no = "8.5".toFloat()
<console>:27: error: Float does not take parameters
val no = "8.5".toFloat()
^