the data is missing or not known at this time. This led me to suggest that the null value is a member of every type, and a null check is required on every use of that reference variable, and it may be perhaps a billion dollar mistake. - Tony Hoare
or non-null asserted (!!.) calls are allowed on a nullable receiver of type User? User user = service?.retrieveUser() String result = user.name.toUpperCase() @Inject var service: MyUserService? Null types
} def felix = new Cat("Felix") def garfield = new Cat(name: "Garfield") open class Animal class Cat(val name: String) : Animal() val felix = Cat("Felix") val garfield = Cat(name = "Garfield") Class and objects definitions
val type: String ) class Cat extends Animal { String name Cat(String name) { super("cat") this.name = name } } class Cat( val name: String ) : Animal("Cat") Class and objects definitions