eclipse scala neon3 中无法声明未初始化变量
在菜鸟教程中(http://www.runoob.com/scala/scala-variables.html)说可以只声明但不初始化变量,但是在eclipse scala neon3 中无法声明未初始化变量
我写了如下代码:var s:Int
编译器报错如下:
◾only traits and abstract classes can have declared but undefined members
◾local variables must be initialized
想问下
1. 这是什么原因
2. 如果是ide设置原因的话怎么改过来
3. 如果是ide本身的原因的话,麻烦解释一下是是什么原因