From the article:
val x = new Array[Integer](3) //type inferred for x
x(0) = 1
x(1) = 2
x(2) = 3
for (y <- x if y > 2)
println(y)
The idiomatic way to do this is: val x = Array(1, 2, 3)
That infers the type and sets values in one shot, with fewer characters. Also, using Integer (that's the java.lang.Integer) has been deprecated since 2.8.1 I believe. `Int` is preferred unless you really mean to use `Integer` (e.g. you're using a native Java library).