comparing java and scala in Scala REPL