Suneet Agrawal
1 min readMar 3, 2018

--

daniel vidonyi Yes, you are right. There was a typo error.

It should be ?: instead of ?. in this case.

The correct syntax would be

val result = nullableVariable?.someMethodCall()
?: fallbackIfNullMethodCall()

Thank you for identifying the error. I have corrected the same.

--

--