Object - Kotlin Vocabulary

preview_player
Показать описание
Object is a special class in Kotlin that only has one instance, which you can use to create Singletons easily. In this episode, we go over the differences between implementing a Singleton in Java versus Kotlin, how you can create Singletons in Kotlin without using the static keyword, and what’s happening under the hood when using object.

#Kotlin #AndroidDev #Featured
Рекомендации по теме
Комментарии
Автор

The animations for the different threads are really well done 👍

codinginflow
Автор

Maybe something about delegates in the future? They're really special and powerful when used well, but I don't think many people know how to use them.

JolanRensen
Автор

For curious, there is also one thing that anonymous objects in Kotlin can do unlike their Java's counterparts: implement multiple interfaces at once, like that: object : Interface1, Interface2 {}

pawewodarczyk
Автор

Super clear explanation, need more videos about kotlin like this

muralitharan
Автор

I ♥️ object classes. I also ♥️ the Voltron in the background 😀

goobar
Автор

Nice videos!! please make videos about other topics like generics, sealed classes, inline etc. Thank you

hitec
Автор

thanks for demonstrating expression based instantiation too.

ChunkyChest
Автор

what does an instance of an object mean? is it different from the instance of a class?

keshavjha
Автор

6:34 There is no colon between object and braces

var temp = object{
var value = 2
var another = 3
}

apoorvgupta
Автор

Great video and awesome cap in the end

szLynAs
Автор

Not all of us come from a Java background. I'm new to Kotlin but I think this info would have been clearer to me if you spoke in Kotlin terms first and saved the Java analogies for later.

JoeyTemme
Автор

Learning Kotlin for Android, made my first app with Java in 2016, anyone else self taught that managed to find employment?

dontbotherreading
Автор

Seriously I don't see any major advantage of "object" keyword for singleton in kotlin. Because
* It does not support parameterized singleton
* We can create singleton without "object" with just two more lines having a lot of control over it.

SanketBhat
Автор

Do we really need a video on this?? This is already well documented in the Kotlin documentation.

SnoopyDoofie
Автор

Learning object oriented languages is wasting of time. Learn functional languages for instance Clojure. Updating a value in a nested data class structure in Kotlin is a big copy chain which is so cumbersome. In Clojure it's (assoc-in value [:users 4 :address :zip] 12345) for updating the zip code of the 5th user in a list.

RonnyBubke