=>、()=>和Unit=>之间有什么区别?
case class Scheduled(time : Int, callback : => Unit)
case class Scheduled(time : Int, callback : () => Unit)
Scheduled(40, { println("x") } )
Scheduled(40, { () => println("x") } )
class Scheduled(time : Int, callback : Unit => Unit)
Scheduled(40, { x : Unit => println("x") } )
Scheduled(40, println("x") )
狐的传说
qq_花开花谢_0