What is difference between When and If-Else in Kotlin??
I didn't clearly understand the difference between if-else statements and when statements in Kotlin. What does they do different? They seemed to do the same thing for me.
when can only have statements, that can only have 1 statement, that returns any value, this will allow you to strictly assign a when statement to a variable. I think when is only a bit similar to switch.
No I was asking about when not while😅 .. while is there but I'm asking for the difference between when and if-else. Maybe you are familiar with switch. In the community course of Kotlin says that when is equivalent to Switch in other languages.
I have tried every way I could find but still I can't display my local images ..what am I doing wrong?
Pls rectify the errors.
Python list half printed