In scala i have function like this:
def generateString(format: String,
parameters: Map[String, String] = Map()) {
generate(format, parameters)
}
And now, i want to call it form java
Map<String, String> params = new HashMap<String, String>();
params.put("test1", "test2");
Generator.generateString("", params);
But i get error that cannot convert form java map to scala map.
So, how to solve this.
p.s. I am new to Scala.
Change your utility signature:
Or use java-to-scala converter in Java code: