Cca175 spark and hadoop developer certification syntax

scala

#1

I am new to SCALA … I have no JAVA experience … In the video what does " : " mean ?
in the video basic programming constructs
for example :help , :paste or when it is used in a statement
var x: Int = xc
var y: Int = yc
def times [A](f: =>A): Unit = {

also in the (for loop ) or( while loop) is there a way to show the values in each loop.


#2

“:” this is called as colan. :help command is used to check for a list of commands available and :paste command is used to write multiple lines of code in REPL

we can display values using a loop with this following way

let us assume a variable “a” contains list of fruits in an array like this
scala > val a = Array(“apple”, “banana”, “orange”)
to display the above values we use this following way
scala > for (e <- a) println(e)