Variance

Run Settings
LanguageKotlin
Language Version
Run Command
fun main(args : Array<String>){ val car = Car(200) val motorCycle = MotorCycle(100) var vehicle: Vehicle = car vehicle = motorCycle // val carList = listOf(Car(100), Car(120)) val vehicleList = carList } abstract class Vehicle(wheel: Int) class Car(speed: Int) : Vehicle(4) class MotorCycle(speed: Int) : Vehicle(2)
Editor Settings
Theme
Key bindings
Full width
Lines