I have a method which returns an array, on with I check that a certain index is set. In Java, I would do:
if (obj.method() != null && obj.method()[some_index] != null) {
...
}
Is it possible to shorten this in Kotlin with the ?.
operator?
The following non-functional pseudo-code gives an idea what I am after:
if (obj.method()?.[some_index]) {
...
}