Interface Concept and Multiple Inheritance In Java - Core Java - Part - 14

Поділитися
Вставка
  • Опубліковано 15 лис 2024

КОМЕНТАРІ • 74

  • @pkumar2371
    @pkumar2371 4 роки тому +8

    I never thought that I will learn java ever but one day my friend told about naveen automation labs and when i saw first video. that day i thought yes I also can learn java..Thanx a lot Naveen.

  • @prashanawali1525
    @prashanawali1525 5 років тому +10

    I wonder.. who are these five those put dislike !! Naveen you are really superb. Thank you

  • @minakshigulia8997
    @minakshigulia8997 4 роки тому +1

    i lv your way of teaching so much ,it makes me feel like ..............m apse pdhti rhu pdhti rhu pdhti rhu.............................

  • @rickyjindal999
    @rickyjindal999 3 роки тому +2

    In java 9 we can create private method under interfaces.
    And in java 8 default concrete method and static methods are also available.
    if we are create any default method in interface in that case we must have to use the defect keyword
    Eg: "default void display()
    {
    --
    }"
    Thanks naveen your videos are amazing

  • @AishwaryaShinde-j8p
    @AishwaryaShinde-j8p 8 місяців тому

    I never understood interface concept so clearly, Thank you Naveen !! Awesome way of explaining.

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

    Naveen, you have explained Interface concept in very simple way. I have learn it now in real sence.Thanks & keep going..... :)

  • @mohmashooqdowlati7933
    @mohmashooqdowlati7933 4 роки тому +3

    Outstanding Job Mr. Naveen! May God Bless You.

  • @MultiPrasad99
    @MultiPrasad99 5 років тому +7

    Nice video Naveen. Just one correction Java 8 allows to have static and default methods in interfaces

  • @sureshsubramaniyan3201
    @sureshsubramaniyan3201 5 років тому +1

    Really very useful and understood interface Concept and Multiple Inheritance. Thank you once again

  • @zarifjamshidi8050
    @zarifjamshidi8050 4 роки тому +1

    Excellent explanation and awesome videos. thanks Mr.Naveen

  • @ashwinikunapareddy2773
    @ashwinikunapareddy2773 4 роки тому +1

    Hi Naveen, Thank you so much for wonderful videos..

  • @tarekhasan8545
    @tarekhasan8545 4 роки тому +3

    Hi, Sir,
    I absolutely finding these videos very helpful, Where i had no knowledge in Java .
    I was following the videos serially but got confused after 14 th video. which one should i follow after Interface concept

    • @ashokchandola
      @ashokchandola 3 роки тому +1

      15th 😂😂
      Array vs array list

  • @minanurjan5007
    @minanurjan5007 5 років тому +2

    you are amazing Naveen~!~!thank you very much, helped me a lot. you explained so much easy way to solved all my problems

  • @DebunkSensibly
    @DebunkSensibly 3 роки тому

    Thank you Naveen. It really helped me

  • @OptionTraderDiary
    @OptionTraderDiary 5 років тому +1

    Naveen, looks like this video has to be modified since from Java 8, Static methods are allowed in interface and there is also a new type called default for method declaration.

  • @nitin.parihar820
    @nitin.parihar820 3 роки тому

    Hi Naveen, Thanku for such clarity on every topic. Just a small request, please increase the font while writing the code in eclipse. It is somewhat difficult to get a good view. Thanks a ton.

  • @ITsMeSimna
    @ITsMeSimna 6 років тому +1

    Thanks Naveen!!Ur videos are awesome!!

  • @saurabht09
    @saurabht09 3 роки тому

    Very soon we will see 1M subscribe r for Naveen..keep going 🙏🙏

  • @mohitbansal9938
    @mohitbansal9938 4 роки тому

    Hi Naveen, as per the video we cannot create static method in Interface but I have created a static method in interface with method body and second you said, we can't create method body, but we can create method body in Interface.
    Example for static method is public static void show(){ System.out.println("Static show method");}
    Example for a method with method body is: public default void debit(){ System.out.println("debit method");}

    • @naveenautomationlabs
      @naveenautomationlabs  4 роки тому

      After jdk 1.8 it's allowed to create static method and default method with body. But with non static and default method, you can't give the method body.

    • @mohitbansal9938
      @mohitbansal9938 4 роки тому

      @@naveenautomationlabs ook

    • @naveenautomationlabs
      @naveenautomationlabs  4 роки тому

      ua-cam.com/video/Lt3T8_utZyw/v-deo.html refer this video

  • @divyaupadhyay3534
    @divyaupadhyay3534 5 років тому

    Hi Naveen, As you said We will not able to create main method and static method in interface.But I am able to do it.

  • @MSD_Explorar
    @MSD_Explorar 5 років тому

    Hi Navin.. I am one of your student .. i Just love your videos and thanks a lot for that..
    One small thing i noticed while practicing interface is that only variable declaration (i.e. int minBal; ) is not allowed in interface we have to initialize them (e.g int minBal = 4500). otherwise it gives "Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    The blank final field minBal may not have been initialized"

  • @tapaskhandai
    @tapaskhandai 6 років тому +1

    Hi Naveen method overriding is run time ploymorphism

  • @WhiteKnight_OG
    @WhiteKnight_OG 7 місяців тому

    Thank you Sir

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

    Hi Sir, as per my understanding inheritance is called is-a relationship and interface is has-a relationship.

  • @justinraj3494
    @justinraj3494 5 років тому

    nice explanation brother ..easy to understand

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

    Thank a lat sir

  • @satyajeetkumar5464
    @satyajeetkumar5464 4 роки тому

    Hi Naveen, please make a video on multi threading concept and synchronization in java. Or if there is a video of yours for these topics please share the link.

  • @RaviKumar-hz8cf
    @RaviKumar-hz8cf 7 років тому +1

    well explained

  • @nazmak4194
    @nazmak4194 3 роки тому

    Very good work sir...
    One doubt When we cant write static methods in interface why we need static variables(why variable are static by default and what is the use of it)??

  • @johnrussel7271
    @johnrussel7271 4 роки тому

    In static and non- static video you mentioned like a static variable can be called directly by the variable name or by class name dot variable but in this case why we are not able to call the variable directly even its though its static in nature

  • @ramyabaskaran8859
    @ramyabaskaran8859 6 років тому

    Thank u naveen

  • @chiragbansod4003
    @chiragbansod4003 3 роки тому +1

    I think there is slight confusion here … Inheritance means Is-A relationship and aggregation means Has-a relationship

  • @deepakrevankar1717
    @deepakrevankar1717 3 роки тому

    Sir what is the significance about minbal variable ? as per minimum balance set by US bank it should be 100. but in child class can alter it to lower

  • @gigapapi
    @gigapapi 3 роки тому

    Is there a separate video for multiple inheritance

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

    I have a doubt if we have same name interface method like debit() this will available in both USbank and Uk bank but those bank have different properties.on that time how can we define method body in testbank class.

  • @jashanpreetkaur1677
    @jashanpreetkaur1677 5 років тому

    Hi Naveen
    I have a Question here.As you mentioned in the video no static methods are allowed in the Interface.But as per my below code,i am not getting any error.Kindly answer .
    public interface Con {
    int a = 10;

    static void sum() {
    System.out.println("hey");
    }
    }

    • @naveenautomationlabs
      @naveenautomationlabs  5 років тому +1

      This is allowed after jdk1.8. You can have static and default methods in interface.

  • @tejastoley6714
    @tejastoley6714 5 років тому

    we can define static method in parent interface but we can access that method by using only Interface name.

  • @michaelgathogo7878
    @michaelgathogo7878 6 років тому

    Is multiple inheritance possible in java or did you mean multiple level inheritance? what is different between multi-level inheritance and multiple inheritance?

    • @dillikumar7074
      @dillikumar7074 6 років тому +4

      multilevel inheritance can be acheived by inheritance ,.....multiple inheritence can be acheived by interfaces in java....
      differnce b/n multilevel and multiple is ....
      multi-level inheritance : suppose A is the super class ,A has a child named B, and B also have child called C,
      A(grand father)--->B(father)---> C (child) ---> multilevel inheritence each child has only one parent.
      multiple-inheritance : Here single child can have more than one parent .....

  • @AdityaSingh-wy7xe
    @AdityaSingh-wy7xe 5 років тому

    Can you please make a pictorial memory representation with properly stating the memory names, I am bit confused regarding the memory representation of the following:
    --USBank b=new HSBCBank()

  • @prafullmanjare7291
    @prafullmanjare7291 4 роки тому

    Naveen please put this code link in Description
    So that easy to download
    Thank you

  • @chethanasurpur9866
    @chethanasurpur9866 6 років тому

    Hi Naveen, I am a little confused. If we can create an object of any class anywhere as long as the class is public, then why do we need inheritance coz you can only inherit public classes. Please explain this part.

    • @dillikumar7074
      @dillikumar7074 6 років тому

      Hai,suppose if they are 10 ten classes with public , you need to create object for 10 classes right ? to acces that class methods, unnecessarily wasting of memory right? if we inherite only one time object creation is enough right?
      I guess it is correct assumption, if wrong plz correct me.

  • @CodeAutomateHub
    @CodeAutomateHub 3 роки тому

    hi naveen what to do when two interface have same methods and same signature the test class calls which method????

    • @naveenautomationlabs
      @naveenautomationlabs  3 роки тому

      Child class will implement only one method and test class will call that method.

    • @CodeAutomateHub
      @CodeAutomateHub 3 роки тому

      @@naveenautomationlabs so which method will be implemented interface 1 or interface2??

    • @CodeAutomateHub
      @CodeAutomateHub 3 роки тому

      oh understood @Naveen AutomationLabs i just implemented it practically

  • @sanjupole1491
    @sanjupole1491 4 роки тому

    What if, if both the interface has same method then which method would get implemented

  • @anamicasingh6837
    @anamicasingh6837 3 роки тому +1

    Just one small doubt.. Can 2 different Interface have same method .
    If yes, how can we call them in single class.

    • @naveenautomationlabs
      @naveenautomationlabs  3 роки тому +1

      you can have same methods in 2 diff interfaces. But you need to override only once in child class and write buss logic accordingly.

    • @anamicasingh6837
      @anamicasingh6837 3 роки тому +1

      @@naveenautomationlabs Thank you so much... Your videos are really really helpful.

  • @happylife8943
    @happylife8943 5 років тому

    java 8 allows static methods in interface

  • @RaviKumar-hz8cf
    @RaviKumar-hz8cf 7 років тому +1

    make video of abstract class also

  • @kgip11
    @kgip11 3 роки тому

    If static methods not allowed in Interface then how come variables are allowed?

  • @sridhar2127
    @sridhar2127 7 років тому

    Hi Naveen,
    I have a small doubt in calling a static variable in this video.
    In your earlier video, you said there are two ways to call a static variable
    1. Calling directly
    2. Calling with ClassName.variable
    In this time -
    ua-cam.com/video/ah0pn81IdDU/v-deo.html
    But here why it not accepting when we call it directly

    • @praveen420ify
      @praveen420ify 6 років тому +2

      because min_bal is not part of same class. U can call direcly when variable is part of same class.

  • @vhvl3888
    @vhvl3888 5 років тому

    i always watch your videos at 1.5 speed rate

    • @naveenautomationlabs
      @naveenautomationlabs  5 років тому

      Why?

    • @vhvl3888
      @vhvl3888 5 років тому

      @@naveenautomationlabs it actually helps in noticing concept and gets finish in half of the time
      moreover if i neeed to slow i can always pause and rewind.

    • @swapnilbodade1336
      @swapnilbodade1336 5 років тому

      yes thats best way to revise. he has crystal clear explanation, no redudent talk

  • @chnagireddy3792
    @chnagireddy3792 3 роки тому

    What if two interfaces we are implementing have same methods.

  • @hemasahoo4908
    @hemasahoo4908 5 років тому +1

    sir mutualfund s.o.p statement is not printing

    • @gangadharareddy
      @gangadharareddy 5 років тому +3

      You should create object in TestBank.
      BrazilBank bb = new HSBCBank();
      Then try bb. U will get mutual fund()

  • @vijayapriyapalanikumar6213
    @vijayapriyapalanikumar6213 5 років тому

    I have one doubt, what happen if us bank and uk bank have same method name
    For ex: credit method of uk bank
    Credit method of us Bank

    • @dilpudara777
      @dilpudara777 5 років тому

      It docent matter. because normally you create object from interface call the method. you can call what ever the method you want.

  • @jerinthomas3283
    @jerinthomas3283 4 роки тому

    How the mutual fund run in main method?

  • @ramyab6961
    @ramyab6961 6 років тому +1

    can we declare the same method for different Interface?

  • @arabindamohanty2190
    @arabindamohanty2190 3 роки тому

    but I am able to create main method inside an interface