Sealed Classes in Java | Java 17 features

Sdílet
Vložit
  • čas přidán 20. 07. 2022
  • Check out our courses:
    Spring and Microservices Weekend Live Batch : bit.ly/spring-live-weekend
    Coupon: TELUSKO10 (10% Discount)
    Master Java Spring Development : bit.ly/java-spring-cloud
    Instagram : / navinreddyofficial
    Linkedin : / navinreddy20
    More Learning :
    Java - bit.ly/3xleOA2
    Python :- bit.ly/3H0DYHx
    Django :- bit.ly/3awMaD8
    Spring Boot :- bit.ly/3aucCgB
    Spring Framework :- bit.ly/3GRfxwe
    Servlet & JSP :- bit.ly/3mh5CGz
    Hibernate Tutorial :- bit.ly/3NWAKah
    Rest API | Web Service Tutorial :- bit.ly/38RJCiy
    Git :- bit.ly/3NUHB3V
    JavaScript :- bit.ly/3mkcFys
    Kotlin :- bit.ly/3GR2DOG
  • Věda a technologie

Komentáře • 36

  • @usirikayalaharish787
    @usirikayalaharish787 Před 2 lety +37

    Teach DSA in java sir!!!

  • @letmecode1767
    @letmecode1767 Před 2 lety +35

    Hey Navin, please teach us DSA with Java

    • @cartoonnewseasons3461
      @cartoonnewseasons3461 Před 10 měsíci +1

      yeaaaaaaaaah we need it, from this awesome teacher 😍😍😍😍

  • @harikrish0075
    @harikrish0075 Před 2 lety +2

    Easy to understand the tutorial by your way of teaching the concepts...Thanks Navin reddy sir...
    Enthusiastic to learn more from you...

  • @kantanaik1822
    @kantanaik1822 Před 2 lety +1

    Great!!! Waiting for more new features videos. 😊

  • @souvikmukherjee5612
    @souvikmukherjee5612 Před rokem

    Sir, it was awesome. In a video of 9 mins I got to know inheritance with classes and interfaces then with associated keywords. Oh I forgot to mention one thing " with practical implementation "

  • @yashgangrade5460
    @yashgangrade5460 Před 10 měsíci

    Nice teaching method over traditional tutorials where the tutor simply writes the correct code and then explains it. I like how you write the code, show errors, and then correct them, as it helps solidify the concepts in the viewer's mind.

  • @dhareppasasalatti6766

    Great Explanations.

  • @ichutv
    @ichutv Před 2 lety +2

    Your classes are awesome 😎

  • @gopalkannan4934
    @gopalkannan4934 Před 2 lety

    Thank you. It is very useful

  • @manasikonde4234
    @manasikonde4234 Před rokem

    Sir,your all videos are very helpful....you give as latest updates also

  • @shubhamsharma9614
    @shubhamsharma9614 Před 2 lety +4

    Thank you Sir for another useful video 😊👍
    I was trying to relate this to a real-time example, couldn't come up with one. Any example which can be suitable for sealed classes?

  • @arolsigning6047
    @arolsigning6047 Před 2 lety

    thanks for this new lessons sir

  • @RahulSharma-rr9cq
    @RahulSharma-rr9cq Před rokem

    So easy explanation 😊

  • @aaronmukerjee2462
    @aaronmukerjee2462 Před 2 lety +1

    Hi, could you please make a video compiling all the added features from java 7 onwards.

  • @avinashkumar4705
    @avinashkumar4705 Před rokem

    Informative video.

  • @manasikonde4234
    @manasikonde4234 Před rokem

    Thank you so much sir...and i am waiting for your new videos and plz make a video for DSA of java.

  • @adewaleosobu3238
    @adewaleosobu3238 Před rokem

    Great lecture as always!In my opinion, I think real world usage might result in lengthy class signatures that are difficult to read and take longer to comprehend.
    Encapsulation might also be violated as class signature might instantly give away sensitive information about parent classes or subclasses. Who else thinks differently?

  • @lalitk7057
    @lalitk7057 Před 2 lety +1

    Seald class looks good concept

  • @raceman1008
    @raceman1008 Před 12 dny

    Are sealed classes generally used for Security in Java? If so what are the main use cases?

  • @VS-techie
    @VS-techie Před 10 měsíci

    Hi Navin, I observed, A permits B which is non-sealed. Now, D is able to extend B, so, ideally D is able to extend A through non-sealed B. Should that be allowed as A is only permitting B and not D ?

  • @queryhub5151
    @queryhub5151 Před rokem

    Hi sir
    I created small website with jsp, jdbc, mysql. Sir how to create reward points like add 5 points when user sign up in my website, add 2 points when user login in website.

  • @Abiram77
    @Abiram77 Před rokem

    Thnxs

  • @rinadem5219
    @rinadem5219 Před rokem

    amazing

  • @iamdivyaprakash
    @iamdivyaprakash Před 2 lety

    Sir today doubt session will live???

  • @ashiqmohamed6675
    @ashiqmohamed6675 Před rokem

    Please create separate playlist for java Design patterns

  • @sabavatsrikanth8798
    @sabavatsrikanth8798 Před 2 lety

    Sir please make a tutorial on data science

  • @botkuppusamy157
    @botkuppusamy157 Před 2 lety

    Sir if i watched your channel top to bottom , am programmer ah Sir. 😎 (Reply pannunga Sir)

  • @dharmaraju2775
    @dharmaraju2775 Před 9 měsíci

    Sir please provide a sample program on sealed classes with complete execution

  • @VikasSharma-nx5go
    @VikasSharma-nx5go Před rokem

    Sir Java 17 ki alag se playlist bana do

  • @dhanshyamkamath8493
    @dhanshyamkamath8493 Před rokem

    Kotlin :)

  • @angadbansode8363
    @angadbansode8363 Před 5 měsíci

    Sealed Classes in Java. Feature of Java 15 not Java 17 @Navin sir

  • @cartoonnewseasons3461
    @cartoonnewseasons3461 Před 10 měsíci

    @Telusko pleaaaaaaaaaaaaaase we DSA in JAVA from you, thanks a lot ❤❤❤❤❤❤❤❤

  • @reveal5081
    @reveal5081 Před rokem +1

    Hara Hara mahadeva

  • @ramnikTDM
    @ramnikTDM Před 2 lety

    First with 100 people

  • @teluskosupport1
    @teluskosupport1 Před rokem

    Sealed class Notes :
    Eg#1
    sealed class A permits B,C
    {
    }
    /*
    C:\Users\Shiva Srivastava\Desktop\Programming>javac Main.java
    Main.java:5: error: sealed, non-sealed or final modifiers expected
    class B extends A
    ^
    Main.java:9: error: sealed, non-sealed or final modifiers expected
    class C extends A
    ^
    2 errors
    */
    //without mentioninng sealed , non-sealed or final you cannnot extends sealed class
    final class B extends A
    {
    }
    final class C extends A
    {
    }
    //class D cannot inherit A but B and C and inheirt
    class D extends A//if you are inheriting A you get compile time error
    {
    /*
    C:\Users\Shiva Srivastava\Desktop\Programming>javac Main.java
    Main.java:27: error: class is not allowed to extend sealed class: A (as it is not listed in its permits clause)
    class D extends A//if you are inheriting A you get compile time error
    ^
    1 error
    */
    }

    class Main
    {
    public static void main(String []args)
    {
    System.out.println("shiva");
    }
    }
    eg#2
    sealed class A permits B,C
    {
    }
    /*
    C:\Users\Shiva Srivastava\Desktop\Programming>javac Main.java
    Main.java:5: error: sealed, non-sealed or final modifiers expected
    class B extends A
    ^
    Main.java:9: error: sealed, non-sealed or final modifiers expected
    class C extends A
    ^
    2 errors
    */
    //without mentioninng sealed , non-sealed or final you cannnot extends sealed class
    sealed class B extends A permits D
    {
    }
    final class C extends A
    {
    }

    final class D extends B// B you can inherit D by making d as sealed or non-sealed
    {

    }

    class Main
    {
    public static void main(String []args)
    {
    System.out.println("shiva");
    }
    }
    eg#3
    sealed class A permits B,C
    {
    }
    /*
    C:\Users\Shiva Srivastava\Desktop\Programming>javac Main.java
    Main.java:5: error: sealed, non-sealed or final modifiers expected
    class B extends A
    ^
    Main.java:9: error: sealed, non-sealed or final modifiers expected
    class C extends A
    ^
    2 errors
    */
    //without mentioninng sealed , non-sealed or final you cannnot extends sealed class
    non-sealed class B extends A
    {
    }
    final class C extends A
    {
    }

    class D extends B// B you can inherit D by making d as sealed or non-sealed
    {

    }

    class Main
    {
    public static void main(String []args)
    {
    System.out.println("shiva");
    }
    }