Download Scala Tutorial (PDF Version) - Tutorials Point
Download Scala Tutorial (PDF Version) - Tutorials Point
Download Scala Tutorial (PDF Version) - Tutorials Point
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Scala</strong> Strings .......................................................................... 58<br />
Creating Strings: ...................................................................................... 58<br />
String Length: .......................................................................................... 59<br />
Concatenating Strings: ............................................................................ 59<br />
Creating Format Strings: ......................................................................... 60<br />
String Methods: ....................................................................................... 60<br />
<strong>Scala</strong> Arrays ........................................................................... 64<br />
Declaring Array Variables: ....................................................................... 64<br />
Processing Arrays: .................................................................................. 65<br />
Multi-Dimensional Arrays: ........................................................................ 66<br />
Concatenate Arrays: ................................................................................ 66<br />
Create Array with Range: ........................................................................ 67<br />
<strong>Scala</strong> Arrays Methods: ............................................................................ 68<br />
<strong>Scala</strong> Collections.................................................................... 69<br />
Basic Operations on List: ......................................................................... 70<br />
Concatenating Lists: ................................................................................ 71<br />
Creating Uniform Lists: ............................................................................ 72<br />
Tabulating a Function: ............................................................................. 72<br />
Reverse List Order: ................................................................................. 72<br />
<strong>Scala</strong> List Methods: ................................................................................. 73<br />
Basic Operations on Set: ......................................................................... 76<br />
Concatenating Sets: ................................................................................ 76<br />
Find max, min elements in Set: ............................................................... 77<br />
Find common values in Sets:................................................................... 77<br />
<strong>Scala</strong> Set Methods: ................................................................................. 78<br />
Basic Operations on Map: ....................................................................... 81<br />
Concatenating Maps ................................................................................ 81<br />
Print Keys and Values from a Map: ......................................................... 82<br />
Check for a Key in Map: .......................................................................... 82<br />
<strong>Scala</strong> Map Methods: ................................................................................ 83<br />
Iterate over the Tuple: ............................................................................. 86<br />
Convert to String: ..................................................................................... 87<br />
Swap the Elements: ................................................................................. 87<br />
Using getOrElse() Method: ...................................................................... 88<br />
Using isEmpty() Method: ......................................................................... 89<br />
<strong>Scala</strong> Option Methods: ............................................................................ 89<br />
Find Min & Max valued Element: ............................................................. 91<br />
Find the length of the Iterator:.................................................................. 91<br />
<strong>Scala</strong> Iterator Methods: ........................................................................... 92<br />
TUTORIALS POINT<br />
Simply Easy Learning