G4143
G4143

Reputation: 2829

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

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

I'm teaching myself Scala and I'm really loving the language but I'm a little disturbed that you also have to know some of the Java standard library to write Scala code.

I'm not a Java programmer so I'm curious what 'main' parts of the Java standard library are not represented in the Scala standard library?

Upvotes: 3

Views: 166

Answers (2)

Gareth Latty
Gareth Latty

Reputation: 89017

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

That said, the Java standard library is very large and complete. There are going to be parts that don't exist in Scala. That said, thanks to the fact that calling Java code from Scala is not difficult, it's not a matter of needing to 'know' the Java standard library. If you find you need something that isn't in the Scala standard library, and you find it in the Java standard library, you can use it.

If anything, it's just another option, thanks to the shared underlying architecture.

Upvotes: 1

nitishagar
nitishagar

Reputation: 9413

It's not required to know Java (Standard Libraries) for using Scala (does help in some cases). As for the libraries can be classified to two types:

Original Scala Libraries which are written in Scala and Scala Wrappers over Java Libraries which provide a Scala-friendly API.

There is an informative stackoverflow post here (for more info).

Upvotes: 5

Related Questions