class x(x:int){val y=x}
class z {
val grid= Array.ofDim(8,8)
}
Is that object already initialized? when i try to initialize in loop like
for(i<-0 until 8;j<-0 until 8) grid(i)(j)=new x(someValue)
i am getting error: Null pointer exception
class Foo(x: Int) {val y=x }andclass Foo(val y: Int)are essentially the same