I have two files. One is scala and other is java.
Scala file has a function which returns scala immutable map.
Java file wants to use that map as dictionary.
I am a newbie to scala and java. How can I convert that scala map to java dicionary?
This is a better way to convert a Scala immutable.Map to a Java Map in Java.
java.util.Map<String, String> javaMap = scala.collection.JavaConverters
.mapAsJavaMapConverter(scalaMap).asJava();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With