JAVA DEVELOPER SITE
 

Scala - Introduction


Scala stand for Scalable Language

Scala is a hybrid functional programming language.

Scala is object-oriented

Scala is a OOP . Types and behavior of objects are described by classes Classes are extended by subclassing and a flexible mixin-based composition

Scala is functional

Scala is a function because every function have value and every value is an object we can say every function is an object.

Scala support higher-order functions it allows functions to be nested, and supports currying

Scala is statically typed

statically typed languages like C# and Java, C same as Scala does not expect you to provide redundant type information

Scala runs on the JVM

Scala is compiled into Java Byte Code which is executed by the Java Virtual Machine (JVM) so Both have conman run time.

The 'scala' command is similar to the java command

Scala can Execute Java Code

Yes , you to use all the classes of the Java SDK .

Scala vs Java

Scala has a set of features that completely differ from Java. Some of these are
  • All types are objects Type inference
  • Nested Functions
  • Domain specific language (DSL) support
  • Closures