Kotlin: val vs const val for variable declaration

Опубликовано: 17 Январь 2021
на канале: Rahul Pandey
10,905
346

There are 3 ways to declare variables in Kotlin: var, val, and const val. The latter two, val and const val, are both used to represent something which is read-only. This video explains when you can use one over the other.

Kotlin docs: https://kotlinlang.org/docs/reference...
➤ Programming Kotlin by Venkat Subramaniam: https://amzn.to/33yHJ7r
➤ Android Cookbook: https://amzn.to/3IfEX6h
➤ Head First Kotlin: https://amzn.to/3I77Z7Z

Hi! I’m Rahul, a software engineer with a passion for teaching. I went to Stanford, was a founding engineer at a startup, and have worked at various companies across Silicon Valley. I’m currently an Android Developer at Facebook and teach an Android class at Stanford. Would love to connect with you! This channel is about tech (especially Silicon Valley), combining tactical how-to guides with interviews.

📹 YouTube: https://www.youtube.com/c/RahulPandey...
📝 LinkedIn:   / rpandey1234  
🐦 Twitter:   / rpandey1234  
📸 Instagram:   / rpandey1234  
📂 Github: https://github.com/rpandey1234/


Смотрите видео Kotlin: val vs const val for variable declaration онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Rahul Pandey 17 Январь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 10,905 раз и оно понравилось 346 людям.