Answers for "kotlin type of a constructor"

0

kotlin constructors

class Car(var 
  brand: String, var model: String, var year: Int)

fun main() {
  val c1 = Car("Ford", 
  "Mustang", 1969)
  val c2 = Car("BMW", 
  "X5", 1999)
  val c3 = Car("Tesla", 
  "Model S", 2020)
}
Posted by: Guest on September-09-2021

Code answers related to "kotlin type of a constructor"

Browse Popular Code Answers by Language