-
Notifications
You must be signed in to change notification settings - Fork 0
/
ScalaTest.scala
36 lines (24 loc) · 888 Bytes
/
ScalaTest.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.training
object ScalaTest {
val greeting: String = "Hello, world!" //FIELD VARIABLES
def main(args: Array[String])
{
val distribution: String = "Cloudera" //LOCAL VARIABLES
println("greeting=>"+ greeting )
// println("distribution=>"+ distribution )
// println("Get Bigdata techonogies=>"+ getBigDataStack(true) )
// println("Get distribution version=>"+ getBigDataStack(false) )
// val sctObject = new ScalaClassTest();
// sctObject.invokeClass()
new ScalaPatternMatching().invokeClass()
}
def getBigDataStack(flag : Boolean): Any = { //METHOD VARIABLES
var bigDataStack: Any = null;
if(flag){ //if statement must consists of only Boolean expression
bigDataStack = "MR Hive Spark ...."
} else{
bigDataStack = 3
}
return bigDataStack
}
}