I want to clarify the question about the use of classes and libraries written in java in the scala language. What you need to do to be able to do this? Import? Is it possible then in the class scala to write in java?

  • The solution is really simple: when importing into the file of scala libraries and java classes, they are easy to use directly ... - scalalaz

1 answer 1

You can use any type library .jar in your project, if their use does not cause version conflicts. Those. Importing a jar is usually sufficient to use it. Also, some IDEs (for example, Intelij Idea) allow you to combine open source Java and Scala in one project (but not in one file).

Using Java packages in Scala is the same as using Scala packages in Scala. But in Java, using Scala code is less convenient because of the addition of various prefixes in the name.