Hello, I’m new to Java and Kotlin. So, I opened kotlin-docs and found the topic “Using nullable values and checking for null”.
My question is, what should I do with function “parseInt”, that the example to work correctly.
If i copy the full example, IDEA says that i need to return something in function with block body, and it’s right.
So, should i check string on “hold an integer” and return null or Int? and why we need “parseInt” function or i don’t understand something?
Thank you for your attention.