这个简单的文本书REPL有什么问题?Scala REPL:错误:';'预期但字符串文字发现
C:\Users\abc>scala
Welcome to Scala version 2.11.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala> print "Hello"
<console>:1: error: ';' expected but string literal found.
print "Hello"
^
scala>
据说这是为了打印 “Hello”
确定。所以教科书例如是错误的:-) –
@Pangea它取决于。 [有时,你可以放弃括号,有时,你不是](http://stackoverflow.com/q/1181533/298389) –