Kotlin Sealed Class (With Demo Source code)

Поділитися
Вставка
  • Опубліковано 25 лип 2024
  • Access 7000+ courses for 60 days FREE: pluralsight.pxf.io/c/1291657/...
    In this tutorial, learn about sealed class using 'sealed' keyword in one video:
    - How sealed class is different from enum class?
    - When and why should you use a sealed class?
    - Various properties of the sealed class.
    Learn about enum class: • Kotlin Enum class (wit...
    Source code: bit.ly/2QtcUWR
    Timestamps:
    00:00 Introduction
    00:26 Enum class vs. Sealed class
    02:00 Sealed class
    09:04 Summary
    10:49 Thank You!
    .
    .
    Please donate and support my work
    (If you think my free tutorials are better than paid ones :)
    - Patreon: bit.ly/patreon-donate
    - Paypal/Payoneer: sriyank123@gmail.com
    - UPI (only for India): smartherd@okaxis
    :: If you want to develop a website or a mobile app, email me your requirement at sriyank.siddhartha@gmail.com :: Free demos provided beforehand ::
    - Access my premium courses: bit.ly/sriyank-courses
    Free Programming courses:
    - Ruby Programming: bit.ly/smyt-r
    - Dart Programming: bit.ly/smyt-d
    - Kotlin Programming: bit.ly/smyt-k
    - Java Programming: bit.ly/smyt-j
    - Kotlin Coroutines: bit.ly/smyt-coru
    Free Flutter course:
    - Flutter App Development: bit.ly/2Rg7EFR
    Free Android courses:
    - Android using Kotlin: bit.ly/smyt-ka
    - Android using Java: bit.ly/smyt-ja
    - Android Material Design: bit.ly/2SMJqU6
    - Android Jetpack Architecture: bit.ly/yt-j
    - Android Multiple Screen Support: bit.ly/smyt-mss
    - Android Retrofit: bit.ly/2Ee6GHn
    More free programming courses:
    - bit.ly/smy-list
    Check out my website:
    - bit.ly/smartherd
    Let's get in touch! [Sriyank Siddhartha]
    LinkedIn: bit.ly/sriyank-linkedin
    Facebook: bit.ly/smartherd-facebook
    Instagram: bit.ly/sriyank-instagram
    Twitter: bit.ly/sriyank-twitter
    Github: bit.ly/smartherd-github
    --- Thank you for your love and support ---

КОМЕНТАРІ • 44

  • @SriyankSiddhartha
    @SriyankSiddhartha 2 роки тому +12

    Comment to support this video.
    Thanks folks!

  • @SergiiSukhanov
    @SergiiSukhanov Рік тому +1

    That's amazing explanation. Thank you so much. Just 10 minutes and things becoming much clearer. Thank you.

  • @GK-rc3fd
    @GK-rc3fd 2 роки тому +2

    The way you explain is unique, I got clear the concept just like magic. Thanks
    It would be great if you create a video for patterns in Android MVVM, MVC, etc.

  • @cub3608
    @cub3608 11 місяців тому

    this really helped my kotlin journey

  • @SunilRathod-kl9fe
    @SunilRathod-kl9fe Рік тому +1

    That was really superb video, easy to understand, Thank you

  • @velturidasarath7420
    @velturidasarath7420 4 місяці тому

    Thank you for clear information on sealed class

  • @emanoel724
    @emanoel724 2 роки тому

    Thank you very much for the video, buddy. I"ve just subscribed to your channel.

  • @deleater
    @deleater 11 місяців тому

    Great explanation!

  • @maximkarassev1016
    @maximkarassev1016 Рік тому +3

    You forgot to mention that starting from Kotlin version 1.5 we can define subclasses of sealed class in other files as well if we want to. There is no any restriction to do that!

  • @essohesmel5003
    @essohesmel5003 Рік тому

    Hey man, It works great and without any problems.

  • @TarekBuhdeima
    @TarekBuhdeima Рік тому

    amazing explanation. Thank you so much

  • @samirthapa6145
    @samirthapa6145 9 місяців тому

    Superb explanation. Thanks

  • @bipulsarkar3910
    @bipulsarkar3910 Рік тому

    Great tutorial (y) easy to learn

  • @shortmoviecut
    @shortmoviecut 5 місяців тому

    Appreciate ur work brother. Kinda usefull for me.

  • @2chotti
    @2chotti Рік тому

    thank you

  • @HoaNguyen-iu7hu
    @HoaNguyen-iu7hu 2 роки тому

    Great video. Thanks

  • @sireeshasiri373
    @sireeshasiri373 2 роки тому

    Amazing video

  • @vengateshm2122
    @vengateshm2122 2 роки тому +4

    If possible kindly create a pure kotlin project which has all the features you have been telling.
    So that will be a single place to cover all kotlin language features.

  • @bipinbharti6540
    @bipinbharti6540 Рік тому

    Awesome sir ji. the way you explain it's very understandable sir. I learn many new things from you sir ji. Keep going.

  • @saranyagovindan8423
    @saranyagovindan8423 2 роки тому

    Great video

  • @messi13121
    @messi13121 3 місяці тому

    Just one word for explanation "CLASS"

  • @cyberavater8103
    @cyberavater8103 Рік тому

    Can you make a lecture on Generics in Kotlin? I'm having hard time learning it (most of them are from java to kotlin). I find your teaching method very effective. It'll be nice if you can help out.

  • @reddysurender
    @reddysurender Рік тому

    Really super

  • @bhardwajatul09
    @bhardwajatul09 2 роки тому +1

    Awesome

  • @programers
    @programers Рік тому

    good job

  • @rajendrapawar7369
    @rajendrapawar7369 Рік тому

    nice video but would like to add one correction , sealed class constructor is protected by default .

  • @emu9991
    @emu9991 Рік тому

    Hey if u can add summary and caveats which you show at the end of the video in the code as comment. It will act like a complete notes and will be a go to place for many people..
    Hope u consider this.
    thanks

  • @danielmwinzi9223
    @danielmwinzi9223 2 роки тому

    I somehow in a way understand all of your tutorials

  • @mdjahidulislam9205
    @mdjahidulislam9205 2 роки тому +2

    would you please make a video, how to read Android documentation, how gradle is working in android, core things of android,
    i can build android app, but still having issue reading Android doc . please

  • @s.m.isratara1056
    @s.m.isratara1056 2 роки тому

    Sir please make a video on alarm manger time should be set in code manually
    ...please sir..!!!

  • @Kepler57
    @Kepler57 2 роки тому

    Big thumb up!

  • @UpLiftingU007
    @UpLiftingU007 2 роки тому

    Why not use abstract class rather than sealed class
    Because classes only can be inherited from sealed class in same file or there are more advantages?

    • @samirthapa6145
      @samirthapa6145 9 місяців тому

      Compile time error if we miss any class that extended sealed class in the when condition. Mainly used to manage state .

  • @Guruprakashc
    @Guruprakashc 5 місяців тому

    👍

  • @vikassharma-by4kw
    @vikassharma-by4kw 2 роки тому +1

    Why we can't use is keyword for singleton object??

    • @smartherd
      @smartherd  2 роки тому

      That's already a singleton. And using 'is' makes that redundant

  • @MrSojek
    @MrSojek 2 роки тому

    Do you have any apps in Google Play store?

  • @owenlie
    @owenlie 2 роки тому

    I still don't get why private keyword is not enough? I still confused

  • @vinaybakle6443
    @vinaybakle6443 2 роки тому

    Thoda bahut samja

  • @user-oo2ri6hq7q
    @user-oo2ri6hq7q 4 місяці тому

    thank you

  • @John-qt6qk
    @John-qt6qk 2 роки тому

    Awesome