Mandatory Annotation for Platform Types
Kotlin platform types are types that Kotlin can’t check at compile-time whether these types are nullable or not, and the compiler will allow all operations on them. However, this can lead to runtime errors, such as NullPointerExceptions, if the platform types are actually null and we try to access their properties or methods. For example, if we have a Java class like this:
public class Client {
private String name;
public Client() {}
public String getName() {
return name;
}
}
And...