What parts of Java (standard library) do you need to know in order to write Scala code?

What parts of Java (standard library) do you need to know in order to write Scala code?

I am teaching myself Scala and I really love the language, but it bothers me a little that you also need to know some of the standard Java libraries to write Scala code.

I'm not a Java programmer, so I'm curious which "core" parts of the Java Standard Library aren't represented in the Scala Standard Library?

+3


source to share


2 answers


You don't need to know Java (the standard libraries) to use Scala (it helps in some cases). As far as libraries are concerned, they can be classified into two types:

The original Scala Libraries that are written in Scala and Scala Wrappers through Java Libraries that provide a Scala-friendly API.



There is an informative postoverflow post here (for more information).

+5


source


You definitely don't need to know any Java to use Scala - the standard library includes everything you need at a basic level and more.

However, the Java standard library is very large and complete. There will be parts that are not in Scala. However, because calling Java code from Scala is straightforward, you do not need to "know" the Java standard library. If you find that you need something that is not in the Scala standard library and you find it in the Java standard library, you can use it.



Anyway, this is another option, thanks to the common underlying architecture.

+1


source







All Articles