Static Method in Interface Java 8 | Code Decode [MOST IMPORTANT CORE JAVA INTERVIEW QUESTION]

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

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

  • @prapu5549
    @prapu5549 Год назад +2

    Great Video! Few doubts from my end. If we are having default and static method dosent it affect the 100% abstraction rule of interface?
    Second if we have one abstract and one default method in the interface, dow we need to implement the deafault method also in the class implementing the interface? (Understood static method need not since it cannot be inherited)

  • @youneskhouna
    @youneskhouna 2 месяца назад

    great explanation , i just have a questiion about using static methods for utility needs, i think that all utilities methods should be in a class not interface , because definiton f static methods means that we are gooin t to reuse this methodes without instancatiton of the class , hence the interface cant be instancitated . btut fo the need 1 about commun and security issues i agree . thank u

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

    A small suggestion, if you can disable the sound of your mouse click it would be better...

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

    to the point. Could you please make video for stream with predicates for java 8? You're too good and conceptually clear.

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

      sure. will make video in java 8 features soon.

  • @phanimadhuri4087
    @phanimadhuri4087 3 года назад +2

    Great explanation.I see many videos for each topic,but your content is easy to understand,realistic.

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

      Thanks Phani 🙏👍🙂🙂

  • @kirane5911
    @kirane5911 Год назад +1

    Very good video madam. Thank you so much for good explanation

  • @shubhamshinde524
    @shubhamshinde524 2 года назад +1

    please can you explain why static method of interface are not inherit in implementation class ?

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

    Great tutorial ..please make video for multithreading interview preparations

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

      Sure will create video on that soon

  • @ankitratnani6602
    @ankitratnani6602 2 года назад +1

    As you said that static method can not be override but at 5:19 , livesIn is static method and overriden in Frog class. Can you explain how?

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

      It is overrided but definition is not changed it is same

  • @abhishekgowlikar
    @abhishekgowlikar Год назад +1

    Great video on Java 8 feature.

  • @praveennampelly3559
    @praveennampelly3559 3 года назад +5

    Please don’t take examples from previous videos coz, if I am watching this videos for the first time I really don’t understand the code you explained. Take small and independent example for the current video so that even though people are watching for the first time will get understand the example

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

      Sure 👍thanks for the suggestion

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

    Maam, you told Static methods of Interface cannot be overridden 1:34 , but Frog class did override the static livesIn() method, of AquaticAnimal Interface here 5:21...could you clarify this a little..

    • @negi.priyanka
      @negi.priyanka 3 года назад +1

      yes exactly I have the same doubt. @Code Decode Please explain.

    • @NaveenKumar-ls9ug
      @NaveenKumar-ls9ug 3 года назад +2

      livesIn() method in Frog class is not a overridden method.
      It becomes a non static method of Frog class when we made the livesIn() of Aquatic Animal interface.
      Also we cannot override a static method in child class known as method hiding

  • @bhaveshsachanandani5704
    @bhaveshsachanandani5704 2 года назад +1

    Nice Video. Can you tell if we can declare and define static main method inside an interface? If yes then what will be the usage of it?

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

    Great content... Helped to understand java 8...i am unable to find parallel stream in details.. Could you please help me with link?

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

      Hi Swati,
      ruclips.net/p/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy
      This is link for all java 8 videos we have created till now

  • @vandanac2244
    @vandanac2244 Год назад +1

    I have 1 doubt whether concrete interface can extend functional interface ?

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

      Concrete are classes. Do you mean interface with all static methods?

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

    Nice explanation... Have one doubt... what is the difference between static method and final method...

    • @CodeDecode
      @CodeDecode  3 года назад +2

      Final method can't be overriding, if we make a method final, we can't override it. Static methods are class level methods, it's loaded during class load.

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

      @@CodeDecode thank you 😊

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

    I was looking for this everyone but I got exact answer here. Thanks you Ma'am. if possible
    Please upload a video on Optional class in java 8

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

      🙂🙂Thanks Atul. We are glad we were able to help u out. Sure we will upload optional video 👍

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

    Hi, Can you create a play list on streams / functions / consumer etc., how it utilizes and creates memory on JVM compared to standard approach.?

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

      How JVM responds for standard approach and functional approach.?

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

      It's already there Srihari. 🙂

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

      ruclips.net/p/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy

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

      Sure will create videos on rest topics too soon 👍👍

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

    A great help...thanks....and nice sweet voice!!🙌😅

  • @prashant1617
    @prashant1617 3 года назад +2

    Really good content .. 👏

  • @AbhishekKumar-md4ul
    @AbhishekKumar-md4ul 3 года назад +1

    got rejected 2 times, because i din't knew this.
    Thank you.for this

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

      You're welcome abhishek....

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

    Hi your videos are really helping to get concept clarified thanks for efforts you are putting in . Can you please suggest few scenario based interview questions e.g. How to design pizza system where once 5 pizza bases are ready then only sause should be poured on it . Please help with solution

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

      Nice topics Mayuri will surely create a video on that 👍👍

  • @VinodSamudrala63
    @VinodSamudrala63 Год назад +1

    Hi Can you please provide some Realtime scenario where we exactly write static methods in interface.

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

      Say we want some utility methods. We used to create class. Then create static methods then call them with class name. Rather than creating class you can now use interface

    • @VinodSamudrala63
      @VinodSamudrala63 Год назад +1

      @@CodeDecode
      Thank you for replying !! I appreciate your help...
      Coming to the point
      Still we are calling that static method with interface name here
      What is the advantage I am not clear.

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

      Thanks Vinod. Classes are costly in terms of memory n performance. Hence interface is anytime a best choice👍

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

    very helpful....

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

    Please make a video on the difference between abstract classes and interfaces in java 8

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

      Sure we'll create video for the same

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

    Hi, is this concept also called Functional interface??

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

      No, functional interface are the ones containing only one method. And this method has to be non-static.

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

    Thank You !

  • @rajinikanthmuddam6334
    @rajinikanthmuddam6334 Год назад +1

    Can you share GitHub links for all your examples

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

    Please upload a video on Optional class in java 8

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

    Can you explain stream Api indepth..most of the interviewer asking

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

      Your explanation is very clear and neat ..easy to understand

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

      It's already uploaded on channel

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

      Java 8 Interview Questions(New Features): ruclips.net/p/PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy

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

      Here is what you require 👍
      Please let us know if u need any thing else

  • @jibinjames5128
    @jibinjames5128 2 года назад +1

    Thanks

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

    Tq u for helping me to write my exam with some confidence 🫶💚

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

      All the best Srikanth 👍👍

  • @vipulansri5432
    @vipulansri5432 5 месяцев назад +1

    please are u doing class

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

      Not yet vipul. Difficult to take time out in week days as we all have office work too🙊

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

    Nice voice

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

    Create video for multi threading

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

    Its not clear... Please say it clearly

  • @arishsheikh3000
    @arishsheikh3000 Год назад +1

    Superb tutorial ma'am