Program to convert Java Set of floats to a Traversable in Scala
A java Set of floats can be converted to a Traversable collection in Scala by utilizing toTraversable method of Java in Scala. Here, we need to import Scala’s JavaConversions object in order to make this conversions work.
Now, lets see some examples and then discuss how it works in details.
Set(4.1, 7.1, 8.1)
Set(5.2, 4.5, 9.2)
My Personal Notes arrow_drop_up
Please Login to comment...