Scala – Sets

March 3, 2018 admin 0

// Scala – Sets object Demo { val myset: Set[Int] = Set(1,2,5,8,9,6,4); val myset2: Set[Int] = Set(4,2,9,18,19,16,14); val names: Set[String] […]

Scala – Lists

March 3, 2018 admin 0

// Scala – Lists object Demo { val mylist: List[Int] = List(1,2,5,8,9,6,4); val names: List[String] = List(“Max”, “Tom”, “John”); def […]

Scala – Arrays

February 19, 2018 admin 0

// Scala – Arrays import Array._ object Demo { val myarray: Array[Int] = new Array[Int](4); val myarray2 = new Array[Boolean](5); […]

Scala – Closures

January 6, 2018 admin 0

A closure is a function which uses one or more variables declared outside this function. // Scala – Closures /* […]