特牛网址导航

Scala this 关键字_scala that-CSDN博客

网友收藏
文章浏览阅读6k次。在scala中,this是一个关键字,用于引用当前对象。可以使用this关键字调用实例变量,方法,构造函数。Scala this示例在以下示例中,这用于调用实例变量和主要构造方法。class ThisExample{ var id:Int = 0 var name: String = "" def this(id:Int, name:Strin..._scala that
标签:scala that