Scala code from java code.