Scala tutorial – a complete guide

 919 total views,  6 views today

Scala tutorial

Welcome to Scala tutorial series. On this page, I have listed down most of the Scala tutorial – a complete guide to learn and understand each feature with examples.

Scala tutorial Index

Fundamentals

  1. What is Scala REPL?
  2. How to write the main method?
  3. Scala print println printf function
  4. Scala paste mode
  5. Scala lazy loading concept
  6. Scala String Interpolation

Scala Variables

  1. Scala mutable and immutable variables
  2. Scala var vs val

Scala Operators

  1. Scala arithmetic operations
  2. Scala relational operations

Scala conditional statements

  1. Scala if-else conditional expression
  2. Scala while and do-while loop
  3. Scala Break statement

Scala Class, Case class, Object, and Traits

  1. Scala class
  2. Scala object
  3. Scala Trait
  4. Scala Companion object
  5. Scala case class

Scala Functions and methods

  1. Scala method in detail
  2. Scala function in detail
  3. Scala nested methods
  4. Scala Higher-order functions
  5. Scala Curried or currying functions

Collection

  1. Scala mutable and immutable collections
  2. Arrays
  3. Range
  4. List
  5. Queue
  6. Stack
  7. Set
  8. ListSet
  9. HashSet
  10. SortedSet
  11. TreeSet
  12. Map
  13. ListMap
  14. HashMap
  15. TreeMap
  16. Scala for loop with examples
  17. Scala yield function
  18. Scala tuple
  19. Scala Guard function
  20. 3 ways of for-loop reverse in Scala
  21. Scala forall method with examples
  22. Iterate a List in Scala using ‘for loop’ and foreach
  23. Iterate an array in Scala using ‘for loop’ and foreach
  24. 2 ways to iterate a list in Scala with examples
  25. 2 ways to iterate a map in Scala with examples
  26. 2 ways to iterate a seq in Scala with examples

Collection functions/operation with examples

  1. head()
  2. last()
  3. tail()
  4. distinct()
  5. min()
  6. max()
  7. sum()
  8. count()
  9. mkString()
  10. addString()
  11. drop()
  12. dropRight()
  13. dropWhile()
  14. filter()
  15. filterNot()
  16. find()
  17. findLast()
  18. reverse()
  19. sameElements()
  20. take()
  21. takeRight()
  22. takeWhile()
  23. init()
  24. apply()
  25. contains and containsSlice()
  26. map()
  27. flatMap()
  28. groupBy()
  29. span()

 

Scala I/O operations

  1. Read a file
  2. Write to a file

 

References: Official documentation

I hope the Scala tutorial – a complete guide was very useful and you were able to understand easily. Please stay in touch with this page as we will be adding more features of Scala tutorial with a clear and concise explanation.

I request you to please leave us feedback such this Scala tutorial can be improved further.