Why do I need to put parenthesis after the name of the interface when creating an instance of a SAM interface in Kotlin?

前端 未结 0 1529
清歌不尽
清歌不尽 2020-12-24 07:21

According to Kotlin\'s documentation on SAM Conversions, the syntax for creating instances of SAM interfaces goes like this:

val runnable = Runnable { println         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题