相关疑难解决方法(0)

单个撇号在Scala中意味着什么?

ScalaActors.pdf上的这个幻灯片放映中,单个引号指示何时将消息发送给pong actor?

class Ping(count: int, pong: Pong) extends Actor {
def act() {
   pong ! 'Ping // what does the single quote indicate???
      receive {
         case 'Pong =>
      }
   }
}
Run Code Online (Sandbox Code Playgroud)

scala actor

60
推荐指数
2
解决办法
1万
查看次数

标签 统计

actor ×1

scala ×1