16. Functional Interface and Lambda Expression - Java8 features | Java Interfaces Part3

Поділитися
Вставка
  • Опубліковано 8 чер 2024
  • ➡️ Notes Link: Shared in the Member Community Post (If you are Member of this channel, then pls check the Member community post, i have shared the Notes link there)
    ➡️ Join this channel to get access to member only perks:
    / @conceptandcoding
    Topics which i have covered in this:
    - What is Functional Interface?
    - What is Lambda Expression?
    - How to use Functional Interface with Lambda expression
    - Advantage of Functional Interface?
    - Types of Functional Interface?
    ○ Consumer
    ○ Supplier
    ○ Function
    ○ Predicate
    - How to handle use case when Functional Interface extends from other Interface(or Functional Interface)?
    Chapters:
    00:00 - Introduction
    00:47 - What is Functional Interface
    06:45 - What is Lambda Expression
    15:41 - Types of Functional Interface(Consumer, Supplier, Function, Predicate)
    25:52 - Functional Interface extends from other interface Scenarios
    Join this channel to get access to perks:
    / @conceptandcoding
    #java #softwareengineer

КОМЕНТАРІ • 42

  • @SRaj3907
    @SRaj3907 5 місяців тому +8

    Great content. Just one addition to the built in functions - if you have a requirement where a function should have no arguments and returns nothing (void), you can use Runnable. I think that is another use case of Runnable, apart from threads.

  • @Shiladitya7
    @Shiladitya7 6 місяців тому +1

    Thank you for this explaining very clearly. The concepts and topics you explain in your video is extremely flawless and with simple examples. Have been following and liking your videos from quite sometime now. Please keep up the great work you are doing.

  • @thevagabond85yt
    @thevagabond85yt 6 місяців тому +1

    It is beautiful explaination because it is very simple.

  • @rajas_world_20
    @rajas_world_20 Місяць тому +1

    Very well explained. I have understood and concept us well understood

  • @jitendrapal4216
    @jitendrapal4216 10 днів тому +1

    clear everything ...great😇😇😍

  • @pavankalyan908
    @pavankalyan908 Місяць тому +2

    nice explanation...

  • @sagarsingh-wb8ou
    @sagarsingh-wb8ou 4 місяці тому

    If a functional interface (which do not provide any method inside it) extending non-functional interface which has only one abstract method, then this will work right?

  • @ranitganai2725
    @ranitganai2725 6 місяців тому +1

    One more interesting topic which is method reference could have been explored here in this video.

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

    is it necessary to have generic class in the supplier , consumer type?

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

    Hi Shrayansh, just a doubt at 26:11 , you said that Living Thing is a Non Functional Interface but since it has just one abstract method, it as well is qualified to be a functional interface.Just that there is no @FunctionalInterface annotation on it.Or is it non functional interface because of the presence of public access modifier(which should not be the case as all interface methods are by default public hence making functions Interface's abstract methods public as well.)

    • @ConceptandCoding
      @ConceptandCoding  9 місяців тому +1

      I need to check the video, but as per your description, access modifiers is not the reason.
      Annotation is not there means it's not a functional interface but till it has only one abstract method, we can use it as a functional interface but there is no control any someone can add another abstract method too.

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

      yes you are right. LivingThing is also a funtional interface. but still Bird Interface can't extends it. bcs Bird Interface is funtional Interface (restricted by @FuntionalInterface) so it can't have more than one abstruct method.
      I think Shreyansh has just taken example to give understanding to us. but he can add one more abstruct method in LivingThing interface so it won't confuse others

    • @krishnendughosh2368
      @krishnendughosh2368 6 місяців тому

      @@ConceptandCoding "Annotation is not there means it's not a functional interface...."
      It fulfills the criteria to be a functional interface. It has SAM. And you yourself said the @Annotation is not mandatory right?

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

    Hi shrayansh, for using lambda expressions, do we need to declare interface as Functional Interface?

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

      Declaring the interface as functional interface is not mandatory, until you have only 1 abstract method.

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

    Hello Sir one question might what should we use with spring boot Gradle or maven in a personal project if I plan to use microservices in that project

    • @ConceptandCoding
      @ConceptandCoding  11 місяців тому +1

      Try to use maven. It's very popular among MNCs

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

    hy shryansh, how much time it will take more days to complete java full concepts ? can u tell me date when all completed so that we can move on springboot & microservices

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

      Hi Gnana, currently in a month i am able to upload 6 videos. If i go with the same rate, i think next 2 months we will be in good position with Java. But i can not commit bcoz generally i prepare the content on weekends.

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

    Is it compulsory to use wrapper type variable in parameter, if we make generic type of interface?

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

    Amazing video sirji..but before starting system design ....what are the prerequisites? i am covering this java playlist now .....can i start your LLD series after that?

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

      Yes, we are good with starting LLD after you know any OOPs language

    • @vishalrajiwade6964
      @vishalrajiwade6964 6 місяців тому

      Video is uploaded on 17th nov 2023(11 hours ago ). how come your comments are 4 months ago ?? Just wondering

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

    thanks

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

    Hi Shreyansh, Please make video on java 11 features.

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

    Hi Shrayansh, will you be covering stream API also ?

  • @user-yc8nu8yx4j
    @user-yc8nu8yx4j 5 місяців тому

    Please add notes slide, it is not in the description. It will be very helpful.

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

    Hi Shrayansh, Till when all Java topics will be completing? next 2 months ?

    • @ConceptandCoding
      @ConceptandCoding  11 місяців тому +1

      yes, currently our rate of video going is 2 videos per week, if i am able to maintain the same consistency, by next 2 months i will be able to complete the JAVA

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

      @@ConceptandCoding Thank you shrayansh🙏

  • @nocode659
    @nocode659 6 місяців тому

    sir if we become premium member can we access all videos in the channel?

  • @tangellashivareddy196
    @tangellashivareddy196 6 місяців тому

    I understand functional interface, but in real life interfaces will have more than one methods, so using interface with only one method in it rare case know?

    • @ConceptandCoding
      @ConceptandCoding  6 місяців тому

      Yes generally it's very rare you write your own functional interface, generally we use existing functional interface only

  • @aravindkumarn1776
    @aravindkumarn1776 6 місяців тому

    Notes link??

    • @ConceptandCoding
      @ConceptandCoding  6 місяців тому

      Pls check the description section

    • @learnpromax1
      @learnpromax1 6 місяців тому

      ​@@ConceptandCodingHi Shrayansh, notes are not present in description, please add OneNote slides to help with revision