我正在使用
来使用这些代码Scala IDE build of Eclipse SDK
Build id: 3.0.2-vfinal-20131028-1923-Typesafe
Mac 64bit
java version "1.6.0_65"
Scala code runner version 2.10.3
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
object Hello{
def main(args: Array[String]){
var a = 10
var b = 20
var c = 30
var answer = a * b - c
println("ANSWER: " + answer)
}
}
1)但是我得到了这个编译错误。我找不到任何语法错误。帮助我。
<console>:1: error: eof expected but '}' found.
}
2)我尝试修改&#34; println()&#34;到&#34; print()&#34;在代码中,我获得了新的身份。但我无法理解更多。有价值的答案&#34;之前定义了1行。
<console>:8: error: not found: value answer
print("ANSWER: " + answer)