Session 14- Java OOPS Concepts - Inheritance and Types of Inheritance in Java | 2024 New series

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

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

  • @Sud5588
    @Sud5588 11 месяцев назад +31

    Sir I following you from 1 year and I took your Udemy course also..2 month back I received 2 offer because of your course.. Thankyou so much..I have no words to Thankyou..

    • @sdetpavan
      @sdetpavan  11 месяцев назад +26

      That's fantastic! My goal is to ensure that everyone benefits from the videos.

    • @hrushikeshpurohit2195
      @hrushikeshpurohit2195 Месяц назад +1

      in u demy course any extra concept or same

  • @stevenclark1973
    @stevenclark1973 6 месяцев назад +9

    A brilliant way of teaching.. nice examples broken down and explained perfectly.

    • @sdetpavan
      @sdetpavan  6 месяцев назад +1

      Glad it was helpful!

  • @GowthamGajendran
    @GowthamGajendran 6 часов назад

    the problem for multiple inheritance is explained so clear. Thank You sir.

  • @AkashPattil-j7o
    @AkashPattil-j7o 28 дней назад

    I watched a lot of content on RUclips, but the way Sir explains is on another level and very easy to understand. Before watching this video, I was a bit confused about multiple inheritance, but now I feel very confident about the concept. Thank you, Sir

  • @neela681sumanth8
    @neela681sumanth8 11 месяцев назад +11

    Waiting for Abstraction and Interfaces which is very important and confusing. Hope my confusion will clear today.

  • @A2_Motivation456
    @A2_Motivation456 3 месяца назад +2

    Excellent Sir ❤❤❤ thank you for such videos,now i am get better understanding of this topics ❤❤❤

  • @nagasaimaddula56
    @nagasaimaddula56 10 месяцев назад +3

    Thank you for the detailed explanation .

    • @sdetpavan
      @sdetpavan  10 месяцев назад +1

      You are welcome!

  • @ShaikAmanullah414
    @ShaikAmanullah414 11 месяцев назад +4

    Sir thanks for your videos, with the help these videos i got the job... thankyou so much sir😊

  • @NikitaGinde-j8u
    @NikitaGinde-j8u 27 дней назад

    Superb explaination sir ... Thank you so much🙂

  • @SVRhappy8352
    @SVRhappy8352 8 месяцев назад +2

    I was following your videos i am learning this course sir
    It was very wonderful to understand easy to learn from this video contain information ❤

  • @PreciousEvhameh
    @PreciousEvhameh 5 месяцев назад

    Thanks to you i am done with manual testing, and i am right now into automation testing

  • @ashutoshswain1585
    @ashutoshswain1585 11 месяцев назад +4

    Sir thank you from the bottom of my heart. Your video helped me a lot to get a job😢.you are god to me.🙏

    • @sdetpavan
      @sdetpavan  11 месяцев назад +1

      It's my pleasure

  • @sourabhramteke5635
    @sourabhramteke5635 9 месяцев назад +1

    best teacher for the basic to high about the java

  • @spectruminfo.official5274
    @spectruminfo.official5274 10 месяцев назад +1

    It's very easy to understand even beginers also Tq soo much sir 🎉🎉🎉🎉🎉🎉🎉🎉🎉

  • @numeshialmapiyasiri
    @numeshialmapiyasiri 11 месяцев назад

    Thank you so much! I really enjoyed this session. My confusion about multiple inheritance is now clear. Every session with you has helped me understand things better and added to my knowledge. I appreciate your guidance! Waiting for the next session. please upload it as soon as possible sir.

  • @varunbhardwaj4101
    @varunbhardwaj4101 24 дня назад

    MIND BLOW JOB SIR

  • @sangeetasingh1262
    @sangeetasingh1262 11 месяцев назад +1

    In every journey god send some mentors to help you. You are one of them for this journey. Thank you sir ❣

    • @sdetpavan
      @sdetpavan  10 месяцев назад

      It's my pleasure

  • @sirisharayaprolu
    @sirisharayaprolu 11 месяцев назад +2

    Thank you so much sir,Every time i am learning something new from your session..

    • @sdetpavan
      @sdetpavan  11 месяцев назад +1

      It's my pleasure

  • @naanavanillai6205
    @naanavanillai6205 3 месяца назад +1

    Excellent Explanation Sir...

    • @sdetpavan
      @sdetpavan  3 месяца назад +1

      You're welcome!

  • @abhishekshahi1209
    @abhishekshahi1209 7 месяцев назад +1

    Perfectly explained sir. Thank you so much.

  • @dunethchadeera5838
    @dunethchadeera5838 5 месяцев назад +2

    thank you sir ❤❤❤

  • @siddharthsidd-i3i
    @siddharthsidd-i3i 11 месяцев назад +1

    waiting for more videos on abstraction ,,interfaces ,files ,exception handling and also advanced java

  • @sainithinp43
    @sainithinp43 4 месяца назад +3

    *Why multiple inheritance is not allowed in inheritance concept?*
    A. In Java, *multiple inheritance* is not allowed with classes to avoid complexity and ambiguity. Let me explain this in detail.
    ### What is Inheritance?
    Inheritance allows one class (called a subclass or derived class) to inherit the properties (fields and methods) from another class (called a superclass or base class). In Java, inheritance is achieved using the `extends` keyword.
    For example:
    ```java
    class Animal {
    void eat() {
    System.out.println("This animal eats food.");
    }
    }
    class Dog extends Animal {
    void bark() {
    System.out.println("The dog barks.");
    }
    }
    public class Main {
    public static void main(String[] args) {
    Dog d = new Dog();
    d.eat(); // Inherited method
    d.bark(); // Dog's own method
    }
    }
    ```
    Here, the `Dog` class inherits the `eat()` method from the `Animal` class.
    ### Why is Multiple Inheritance Not Allowed in Java?
    Multiple inheritance refers to the ability of a class to inherit from more than one class. Java restricts this feature with classes to avoid the **"Diamond Problem"** and **increased complexity**.
    #### The Diamond Problem:
    Let’s consider an example to understand the issue with multiple inheritance.
    1. Imagine you have two classes, `ClassA` and `ClassB`, and both have a method with the same name `display()`.
    2. Now, you create a new class `ClassC` that inherits from both `ClassA` and `ClassB`.
    ```java
    class ClassA {
    void display() {
    System.out.println("Display method from ClassA");
    }
    }
    class ClassB {
    void display() {
    System.out.println("Display method from ClassB");
    }
    }
    // Now, imagine ClassC tries to inherit from both ClassA and ClassB
    class ClassC extends ClassA, ClassB {
    // Which display() method should ClassC inherit?
    }
    ```
    Here comes the **ambiguity**:
    - If `ClassC` inherits from both `ClassA` and `ClassB`, and you try to call the `display()` method, the compiler will not know whether to use the method from `ClassA` or `ClassB`. This ambiguity is known as the *Diamond Problem*.
    Java avoids this situation by *not allowing multiple inheritance* with classes. It simplifies the class hierarchy and prevents potential conflicts that may arise from this ambiguity.
    ### How Java Solves the Problem:
    Java allows *multiple inheritance using interfaces*, which provides a cleaner solution. An interface only defines method signatures without providing the actual implementation. This way, classes implementing multiple interfaces must provide their own implementation for the methods, avoiding the ambiguity.
    #### Example with Interfaces in Java:
    ```java
    interface InterfaceA {
    void display();
    }
    interface InterfaceB {
    void display();
    }
    class ClassC implements InterfaceA, InterfaceB {
    // Must provide implementation of display method
    public void display() {
    System.out.println("Display method from ClassC");
    }
    public static void main(String[] args) {
    ClassC c = new ClassC();
    c.display(); // No ambiguity here, because ClassC provides its own implementation
    }
    }
    ```
    In this case, `ClassC` implements both `InterfaceA` and `InterfaceB`, and provides its own implementation of the `display()` method, thus avoiding the issue of ambiguity.
    ### Conclusion:
    Java doesn't support multiple inheritance with classes to prevent ambiguity and reduce complexity in the class hierarchy. Instead, Java uses interfaces to achieve similar functionality, but in a way that avoids the problems associated with multiple inheritance.

  • @Nimmi3116
    @Nimmi3116 4 месяца назад

    The explanation just too good to miss out on

  • @saurabhsharma-cf7fn
    @saurabhsharma-cf7fn 11 месяцев назад

    Thank you so much sir@sdet qa for providing the best content I am very excited to learn selenium also.. eagerly waiting

  • @jayasuryak5524
    @jayasuryak5524 11 месяцев назад +3

    Devudu sir meeru, nenu ekkada ilanti explanation chudaledhu , thank you sir 🙏

  • @RahulKumar-og6ci
    @RahulKumar-og6ci 9 месяцев назад +1

    you explained it very well!

    • @sdetpavan
      @sdetpavan  9 месяцев назад

      Glad it was helpful!

  • @rahultekade6446
    @rahultekade6446 11 месяцев назад +2

    You are god for us

  • @KrisuParikh
    @KrisuParikh Месяц назад

    thank you

  • @lakshmanvajjakeshavula5380
    @lakshmanvajjakeshavula5380 11 месяцев назад

    We need more people like u sir

  • @tanyagarg2
    @tanyagarg2 11 месяцев назад +1

    In multi level inheritance if x have run() method and y also have run() method and y extends x and z is another class which extends y so eventually z also faces ambiguity as both x and y have run () method in common

  • @srinivasarao1715
    @srinivasarao1715 10 месяцев назад +1

    Nice

  • @VRL2024INDIA
    @VRL2024INDIA 11 месяцев назад +1

    Thank you

  • @goodvipe2412
    @goodvipe2412 11 месяцев назад

    sir i have to cover this syallusbus fast so do you have any other resource , bcz i am in final semeter of my final year left with only 2.5 month and any how i have to find placement in Qa

  • @venugopalthota2574
    @venugopalthota2574 11 месяцев назад

    Sir how to pass runtime values through notepad or command prompt

  • @poojasurajkudale8904
    @poojasurajkudale8904 Месяц назад +1

    hi sir how to get pdf notes

  • @venugopalthota2574
    @venugopalthota2574 11 месяцев назад

    Is main method is predefined or user defined

  • @dhiraj2934
    @dhiraj2934 11 месяцев назад

    Hi sir can I learn only Manual testing and ETL testing without learning selenium?

  • @shahanazPathan-y6v
    @shahanazPathan-y6v 11 месяцев назад

    could you please create a video on sonar qube for test automation

  • @Pra_tea_k
    @Pra_tea_k 5 месяцев назад

    Hello,
    Where can I get the notes for these classes?

  • @RamakrishnaE-r2x
    @RamakrishnaE-r2x 4 месяца назад

    Sir, But in Inheritance there are 5 right?
    Single
    Multi level
    Hierarchy
    Multiple
    Hybrid also there right?

  • @venkatprasad5075
    @venkatprasad5075 11 месяцев назад

    sir please make a video on upcasting and downcasting??? actually i have a doubt why and when to use upcasting and downcasting????

  • @priyankaR-u9j
    @priyankaR-u9j 11 месяцев назад

    Hello sir, Can you please make video on Katalon Studio tutorial

  • @sirishamacharla2233
    @sirishamacharla2233 11 месяцев назад

    Yes sir

  • @utsahsharma2052
    @utsahsharma2052 11 месяцев назад

    Sir approx how many videos will be there in this course??

  • @VRL2024INDIA
    @VRL2024INDIA 11 месяцев назад

    I don't understand what is thread. There are so many definitions available but not able to understand this concept

  • @VRL2024INDIA
    @VRL2024INDIA 11 месяцев назад

    What is Thread in java

  • @abhayjoshi234
    @abhayjoshi234 11 месяцев назад

    Hi sir do you provide training on java fullstack?

  • @PreciousEvhameh
    @PreciousEvhameh 5 месяцев назад

    please i need your udemy link

  • @kishorebabum7485
    @kishorebabum7485 10 месяцев назад

    sir i faced one of the interview question like this.. if in the parent class methods or variables are protected or private then can you inherit the methods or variables from parent .. can you explain this topic also sir.. will help for us..

    • @ziggywiggys
      @ziggywiggys 3 месяца назад

      As far as variables are concerned.
      If parent's class variables are PRIVATE, even if you inherit the Parent Class in your Child Class. You will not have access to those variables.
      If the parent class variables are PROTECTED, then you can have access to these variables in the same class, different class same package, derived class same package, derived class different package, but NOT to different class different package.

  • @surajpatil6939
    @surajpatil6939 11 месяцев назад

    Quick question Sir -> Is this series only focusing on Java concepts ? or you are going to start complete Selenium things as well?
    Please reply Sir

    • @sdetpavan
      @sdetpavan  11 месяцев назад +1

      Selenium will be started after completion of java sessions.

    • @surajpatil6939
      @surajpatil6939 11 месяцев назад +1

      Amazing, Thanks a lot, Hats off to you Sir@@sdetpavan.
      Actually I've taken a 3 months of break to switch into automation as I have work exp. of 3 yrs in Tech Mahindra. I've joined a class but its not much effective but then I came across with your videos.
      I've done Lambda expression, streams, collection series of yours & now sticking with this series.
      I'm so glad that I'm blessed with you at this moment.
      Hopefully you'll conquer 1M milestone soon❤

  • @ganavig8750
    @ganavig8750 11 месяцев назад

    Please upload the vedios alternative days ..

    • @_videowall_
      @_videowall_ 11 месяцев назад

      Hi sir, I am getting error in launching chrome in intelij.... I am able to launch chrome browser but can't navigation/get url in that chrome? Plzz help me on it.
      I am used selenium 3.141.59 and chromedriver 122+ version
      Can i get ur no/ plzz tell me a sol on it.

  • @ashwaniverma4554
    @ashwaniverma4554 11 месяцев назад

    Can you please share udemy link

  • @AbhishekSrivastav-s6k
    @AbhishekSrivastav-s6k 11 месяцев назад

    Sir u also teach in Udemy

    • @sdetpavan
      @sdetpavan  11 месяцев назад +1

      Yes.

    • @ayubansari2074
      @ayubansari2074 11 месяцев назад

      Sir @@sdetpavan , What is the difference Between UAT test cases and QA test Cases. In One of my Interview, Interviewer Asked me this Question. I failed to answer this question

    • @gauravmalik1960
      @gauravmalik1960 11 месяцев назад +1

      @@ayubansari2074 UAT is for USER ACCEPTANCE TEST Mostly done by client with specific test cases and in the UAT Environment
      But QA is done by testing team members and in the QA environment

  • @123afgh
    @123afgh 11 месяцев назад

    hi sir

  • @Instagramreels-ju4jk
    @Instagramreels-ju4jk 11 месяцев назад

    Please provide training for java full stack . Did u used eclipse sir?

  • @AbhishekSrivastav-s6k
    @AbhishekSrivastav-s6k 11 месяцев назад +1

    Sir you also teach in udemy