When in Kotlin - Difference between If else and when in Kotlin
Вставка
- Опубліковано 23 лип 2024
- n this Kotlin programming tutorial, we'll explore the use of When statements and Range in Kotlin. We'll introduce their basic syntax and demonstrate how they can be used with different data types. Through practical examples, you'll learn how to use these important Kotlin concepts effectively. Whether you're a beginner or an experienced Kotlin developer, this video is an essential guide to mastering Kotlin programming. Watch now and take your Kotlin skills to the next level!
00:00 Intro
00:42 When expression in Kotlin
04:43 Range Method in Kotlin
10:08 Difference between If else and When expression
Enroll now and join the hundreds of successful developers who have learned from us.
💎 Course Enrollment Form: neatroots.com/mentorship-prog... - Наука та технологія
sir when can work for both switch n if, elif
for switch ->
var day = 7
when (day) {
1-> "sunday"
2-> "monday"
else -> "other day"
}
for if,elif ->
var grade = 84
when {
grade >= 100 -> "chal jhuta"
grade > 90 -> "above 90"
grade > 80 -> "above 80"
grade > 70 -> "above 70"
grade < 33 -> "failed"
else -> "average"
}
Nicely Explained Sir ji, Thank You.
Thanks for liking
When java may switch ki tara kam krta hai
Nice
Bhaiya website ko app main convert kaise kare???
Sir, yrr aap datao na.
Ki wo Hidden Video ko kaise dakhe playlist me.🙏
Wo deleted videos hei.
@@NeatRoots sir reply karne ke liye dhanyvad.
App kaha say hein
When java may switch ki tara kam krta hai
yes