3 ms·
Kotlin interops nicely with Java but it's not null-safe (all references from Java are assumed non-null).
by sedro 4y ago
Kotlin interops nicely with Java but it's not null-safe (all references from Java are assumed non-null).
- Larrikin 4y agoThat is wrong all, non annotated Java code gets a special type denoted with a ! . You can use ?. or assign it to a new val with ?: return. Or you throw all the null safety away and write unsafe java code but in Kotlin the same as the Java code you're working with.