标签:tor bsp lis eating ota tin ring pre int
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基础(2) --class constructor
标签:tor bsp lis eating ota tin ring pre int
原文地址:https://www.cnblogs.com/pocahontas/p/11405708.html