0% found this document useful (0 votes)
4 views7 pages

Scala

Uploaded by

Tushar Chandel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views7 pages

Scala

Uploaded by

Tushar Chandel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 7

SCALA

PROGRAMMING

Day – 1

Scala Basics

– Scala has Class ,Object , Methods and


instance variable
1. object
2. class
3. mewthods
4. Fields
5. Closure
6. traits
created by – Martin Odersky
high level Programming
– functional programming
– Scala source code complie run on the JVM

Scala Basic

how to write First Scala ProgramMING


HelloWorld.scala

object HelloWorld{
def main(args: Array[String]){
println(“Hello,World”)
}
}

scala created 2004 by martin Odersky

Scala – Scaable Programming Language

std jvm

scala Groovy , Jruby

Fuctional Programming

go to – Spark
JVM `

java complier JVM

java class

scala scala complier class

Scala OOP + Functional Programming

Java 8 Oop + Functional Programming

Execution Environment

• Java 8 * Scala
• Eclipse or Intellij or vs code

Java --- Maven


Depency manegement

Scala – SBT ( scala Build Tool)_


Day – 2

Scala programming

Java Scala
- OOP - pure oop Language
primitive data
type – int , char X – int
,bool,byte,chort

2. public def sum(a,b)={a+b}


static
float sum

java scala value


val c=a+b variable
var c=a+b
int c=a+b; integer
staic typed language

primitive
data type
java
; end of statement

scala

; is optional

ex – var a=5

Scala

a. sum(b)
a.equals(b) . () - optional

java
sum(a,b)

java

diamond inheritance problem

super class (add function)


class a -add(a+b+c+d) class b - add(a+b+c+d)

class – c

scala

Trait ( avoids Problem) – diamond in scala

scala

java—javac –class
jvm
scala scala complier class

You might also like