scala基础 --class constructor
Posted pocahontas
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了scala基础 --class constructor相关的知识,希望对你有一定的参考价值。
class GFG(Lname: String, Tname: String, article: Int)
def show()
println("Language name: " + Lname);
println("Topic name: " + Tname);
println("Total published articles:" + article);
object Main
// Main method
def main(args: Array[String])
// Creating and initialzing
// object of GFG class
var obj = new GFG("Scala", "Constructors", 14);
obj.show();
以上是关于scala基础 --class constructor的主要内容,如果未能解决你的问题,请参考以下文章
scala终端启动报错:[ERROR] Failed to construct terminal; falling back to unsupported