How do i convert a Scala string to a java.lang String.
I have to create a java.net.URL Object from a scala String. How do i do the conversion from a scala String to java.lang.String to pass to the URL constructor
You don't need to do any conversion. Simply pass a String to the URL constructor.
If you look at the scala.Predef String definition you will see this is exactly the same type.
package scala
object Predef extends scala.LowPriorityImplicits {
// ...
type String = java.lang.String
// ...
}