diff --git a/scala.html.markdown b/scala.html.markdown index dc039f0c..529347be 100644 --- a/scala.html.markdown +++ b/scala.html.markdown @@ -54,14 +54,17 @@ var y = 10 y = 20 // y is now 20 /* - Scala is a statically typed language, yet note that in the above declarations, we did not specify - a type. This is due to a language feature called type inference. In most cases, Scala compiler can - guess what the type of a variable is, so you don't have to type it every time. We can explicitly - declare the type of a variable like so: + Scala is a statically typed language, yet note that in the above declarations, + we did not specify a type. This is due to a language feature called type + inference. In most cases, Scala compiler can guess what the type of a variable + is, so you don't have to type it every time. We can explicitly declare the + type of a variable like so: */ val z: Int = 10 val a: Double = 1.0 -val b: Double = 10 // Notice automatic conversion from Int to Double, result is 10.0, not 10 + +// Notice automatic conversion from Int to Double, result is 10.0, not 10 +val b: Double = 10 // Boolean values true @@ -94,8 +97,8 @@ true == false // false This means the result of evaluating 1 + 7 is an object of type Int with a value of 8 - Note that "res29" is a sequentially generated variable name to store the results of the - expressions you typed, your output may differ. + Note that "res29" is a sequentially generated variable name to store the + results of the expressions you typed, your output may differ. */ "Scala strings are surrounded by double quotes" @@ -142,27 +145,69 @@ val html = """