Kotlin Singleton Tutorial - Companion Object, Operator Invoke

Поделиться
HTML-код
  • Опубликовано: 5 фев 2025

Комментарии • 33

  • @gibraanjafar1669
    @gibraanjafar1669 4 года назад +1

    The content is so good, concise and to the point that I don't mind watching the adds. Thanks Belal for this really nice playlist

  • @deeprajpandey7612
    @deeprajpandey7612 4 года назад +2

    Sir, you way of teaching is really superb.... keep making videos sir we really like your contents...

  • @gulfappdeveloper2849
    @gulfappdeveloper2849 4 года назад +5

    Thanks, it is usefull for retrofit & room database in android

  • @benjaminsilva7384
    @benjaminsilva7384 2 года назад

    The best video of world

  • @tuyenvokhac7943
    @tuyenvokhac7943 3 года назад +1

    Perfect explanation

  • @Taran949
    @Taran949 6 месяцев назад

    Wow explaination ❤

  • @hanki009
    @hanki009 4 года назад +2

    Hi Belal, really insightful tutorial about Singleton. I would like to know how can we use the volatile keyword for our instance? Can we do that similar to java by adding volatile keyword ahead of the instance declaration?

  • @trunghieu5386
    @trunghieu5386 4 года назад +1

    you saved my day

  • @deepakshah3108
    @deepakshah3108 2 года назад

    Super explanation

  • @veedfriendforever5990
    @veedfriendforever5990 4 года назад +1

    good morning,
    Hello sir, I am working a project that require some permission that dose not provide normally so, want to know about device policy manager in describe details so please help if you?
    thank you

  • @akashviet007
    @akashviet007 4 года назад +1

    I don't understand the invoke operator, is it used with only companion block? or it has other uses also?

  • @shreyashchoudhary7413
    @shreyashchoudhary7413 3 года назад +1

    Loved it!

  • @zakariarada1856
    @zakariarada1856 4 года назад +1

    GREAT THANKS, BRO.

  • @muskanyousaf20
    @muskanyousaf20 4 года назад +1

    Thnku For the Series 🤝 please make a Video on sockets with Api responses dealing please please🙏

  • @tortoiseshell_cat
    @tortoiseshell_cat 4 года назад +1

    Can i user 'instance get()=...' instead of function and wich on is better

    • @Sumitmaurya070
      @Sumitmaurya070 4 года назад

      ur choice

    • @tortoiseshell_cat
      @tortoiseshell_cat 4 года назад +1

      @@Sumitmaurya070 no getter in kotlin is better performance i read kotlin doca

    • @tortoiseshell_cat
      @tortoiseshell_cat 4 года назад +1

      @@Sumitmaurya070 no getter in kotlin is better performance i read kotlin doca

  • @indra.ndra26
    @indra.ndra26 3 года назад +1

    Hi sir.. How to pass a parameter? in case we need the parameter to be passed to object class

    • @SimplifiedCoding
      @SimplifiedCoding  3 года назад +1

      You can use operator fun invoke, or you can use companion object way as I shown you initially.
      Or you can directly access object to assign objects that are needed.
      There are many ways, it depends on your use case.

  • @mohamedfiyaz8356
    @mohamedfiyaz8356 4 года назад +1

    What's the difference between creating object by singleton method and creating object by lazy delegates?

  • @RWS123ful
    @RWS123ful Год назад

    Only the initialization of an object declaration is thread-safe. If you are using this object outside it won't be thread-safe.

  • @MyMindBusiness1000
    @MyMindBusiness1000 3 года назад

    Thanku thanku thanku thanku thanku

  • @Affliction604
    @Affliction604 3 года назад

    Thank you

  • @tortoiseshell_cat
    @tortoiseshell_cat 4 года назад +1

    Gold❤️

  • @tortoiseshell_cat
    @tortoiseshell_cat 4 года назад +2

    Mann thanksssss i wish i can put 2 like

    • @deeprajpandey7612
      @deeprajpandey7612 4 года назад +1

      bhai jab wish kar hi rahe ho to 2 se jayada hi ka wish kar lo....:)

    • @tortoiseshell_cat
      @tortoiseshell_cat 4 года назад

      @@deeprajpandey7612 ????

    • @deeprajpandey7612
      @deeprajpandey7612 4 года назад

      @@tortoiseshell_cat its a joke bro.... haaaa....jab wish hi karna hai to kitna bhi like karna ka maan lete hai na... ha.aaaaa

    • @tortoiseshell_cat
      @tortoiseshell_cat 4 года назад

      @@deeprajpandey7612 no hindi😀

    • @deeprajpandey7612
      @deeprajpandey7612 4 года назад +1

      @@tortoiseshell_cat jokes a part bro... :)

  • @amazoncrazydeals5061
    @amazoncrazydeals5061 3 года назад +1

    Great

  • @youmeandeveryone5893
    @youmeandeveryone5893 3 года назад +3

    Who else liking Kotlin more than Java?😀