Lambda Expression in Java 8

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

КОМЕНТАРІ • 214

  • @isbeb507
    @isbeb507 5 років тому +163

    OK, so lambda expressions are a way to implement interfaces without making a new class. Finally I get it. Thanks!

    • @fatimaadreeta
      @fatimaadreeta 3 роки тому +3

      I think lambda expressions are more appropriately used as a substitute of one-liner methods. Because we have also used lambda expressionys in abstract classes or inside a container class. And its usually used to express what a method expresses in one line. And that is what I got from the video as well. I may be wrong. 😄

  • @anonymous-do5bs
    @anonymous-do5bs 7 років тому +175

    thank you very much. just to add, lambda expressions only work with interface implementing only 1 method which is called a functional interface.

    • @zedzedder1426
      @zedzedder1426 5 років тому +9

      Thanks. I came to the comments to ask exactly about this.

    • @mrscripp7091
      @mrscripp7091 5 років тому +15

      That question was lingering in the back of my mind for the whole video. Thanks.

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

      great help. thanks for this ans.

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

      @@mrscripp7091 same here

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

      @@mrscripp7091 Same bro!

  • @satyamshah9164
    @satyamshah9164 4 роки тому +20

    Perfectly explained sir! with the files examples too, showing what happens in the background.

  • @madhukarreddy5804
    @madhukarreddy5804 4 роки тому +24

    In just one video
    I have understood anonymous inner class,boiler plate code, lamda expression.
    Earlier I have a confusion on these topics.
    Great explanation
    Thank you.

  • @hamzahahmad1670
    @hamzahahmad1670 6 років тому +17

    The best explanation of lambda expressions that I've come across.
    Thank you.

  • @raghuakuthota4900
    @raghuakuthota4900 6 років тому +9

    Wah !.. what an explanation Sir, I became a FAN of you :) I am confusing these lambda expressions from last 1 year. you cleared it in just 10min.. biggest thanks

  • @sultanb6685
    @sultanb6685 7 років тому +1

    I skimmed through many videos and your video is best by far. GREAT way of explaining and definitely you have great understanding of what you are working with.
    THANK YOU

  • @rishnp
    @rishnp 2 роки тому +1

    Always found lambda confusing , after this video it's crystal clear .. thanks for explaining with example .. really helpful

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

    Perfect explanation, thank you very much. Love your step by step guide from traditional java to java 8 style. Thanks.

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

    Thank you very much, I wouldn't understand how lambda works until I saw this. Cannot stop thanking you.

  • @reemiessa2392
    @reemiessa2392 8 років тому +1

    You are the best. really ! , you somehow find a way to make everything simple and understandable .
    i'm going to take the OCA exam next week and lambda expressions was a new topic for me that i need to study for the exam , you really helped making the topic easier for me .
    Thank you :D !

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

    This can’t be explained better than the way you did sir…phenomenal👌

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

    Amazing is the only word. demystified Lambda. Thankyou.

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

    Sir you are a genius. Lambda expression was getting on my nerves but now I have a better understanding.

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

    Best description in 10 mins
    Far better , not better far best than the 30 mins videos

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

    It's a clear explanation with a good example. You sir, should make educational videos about programming, you would do a good job...

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

    excellent explanation from lambda exp to consumer interface.. great.. Thanks Navin

  • @ashishverma-en6kb
    @ashishverma-en6kb 6 років тому +1

    Thanks you sir for all those videos..
    Sir all the videos are helpful to know how to work but please tell us when to use with some bigger used case example

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

    Simplest & best explanation to lambda expression. Thanks for this video.

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

    Its just the best video available in the market! great work.

  • @mayankmoolchandani7976
    @mayankmoolchandani7976 6 років тому +31

    for(int i=0; i

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

      // This is better
      while(true){
      System.out.println("THANKYOU SO MUCH SIR ");
      }

    • @ahsanashraf7968
      @ahsanashraf7968 5 років тому +11

      () -> sys.out("Thanks");

  • @achrafelkhandouli
    @achrafelkhandouli 4 роки тому +9

    at first l was like: CAN U JUST GET TO THE POINT! but then it surprised me how that worked out

  • @LillEngineered
    @LillEngineered 8 років тому

    Very nice and to the point explanation.
    I don't think any one will unlike it.

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

    Great Explanation Mr.Naveen . Thank you.

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

    Thank u very much sir...understood this lamba concept in a very clear way...

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

    Amazing, you did the post-mortem of lambda expression, very nice explanation

  • @waqardetho2426
    @waqardetho2426 7 років тому +8

    this was a great way of explaining.

  • @mauranisaha
    @mauranisaha 7 років тому +9

    Hi..Its a great VDO.I do have one question.what if we have two undefined function in interface.In that case how we are going to use Lambda expression.Please help me to clear my doubt .Thanks

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

      You can only have one method inside a functional interface. if you have more it would not be functional interface and therefore lambda will not be able to be used in this way.

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

      Add @FunctionalInterface annotation to your Interface to make it as one. It ll restrict us from creating more than one method which is abstract.

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

      Use Default keyword while creating a method in interface and use that with interface reference variable.

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

    wow you just play with it....so realistic explanation...Thank you so much..

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

    dont no how can i appreciate my feeling to you .. thank you for great explaining

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

    Wonderfully explained! Thank you so much!

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

    Thanks for this wonderful video. May gbu with lots of success love and life. Keep Rocking... Small suggestion::Please do add the source code so that later we can use that to revise and make notes please

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

    Thanks a lot.Very good explanation.

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

    Best video to understand Lambda expressions.

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

    Mind blowing explanation

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

    you helping in my career so much! thanks

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

    Wow, you did a great help. This thing was really hard before watching this video.
    "One doubt though. Can we use lambda if there are more than one method in the interface?*

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

    Excellent explanation. thank you

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

    Excellent example & explaination

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

    Thanks Sir,for the proper and the best explanation.

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

    Naveen, you should have donation links in summary(description) of all videos..

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

    Im really understood every you videos so; i would like to say thank you

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

    Super understandable even for non english speakers

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

    Awesome Explanation

  • @31bikashdash
    @31bikashdash 8 років тому +1

    very nice ly explained please put some tutorial over threading and concurrency

  • @VijayKumar-qf9rp
    @VijayKumar-qf9rp 4 роки тому

    Great explanation... Congrats sir

  • @TamilselviR-d6f
    @TamilselviR-d6f 6 місяців тому

    Very well explained.thankyou.keep posting videos like this

  • @sharifulislam-pd3sj
    @sharifulislam-pd3sj 5 років тому

    Wow!!!!! What a great tutorial it is!!! Lot of thanks sir.

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

    Nice content. thanks for the info.

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

    Nice video. Thank you sir for such wonderful videos !!

  • @04minutes53
    @04minutes53 8 років тому +1

    great work keep it up

  • @1996Pinocchio
    @1996Pinocchio 6 років тому

    Great explanation and examples, thank you so much! :)

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

    Best I've seen. Now I understand everything ;)

  • @m.praveenkumar3702
    @m.praveenkumar3702 6 років тому +2

    Nice Explanation. 1 doubt what happens if we have multiple methods in the same interface.

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

    great explanation..

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

    Really good and simple explanation

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

    wah mazza agaya

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

    Thanks man for the best breakdown and example!

  • @balamca416
    @balamca416 8 років тому +4

    Great work,thanks, if interface has more than one method, how java 8 handle in lamba expression. suppose if class implement more than one interface like interface1->show1 and interface1->show2, how we will define in lamda expression

    • @mak.ak.uk.
      @mak.ak.uk. 8 років тому

      "if interface has more than one method"
      I don't think lambdas can work with an interface with more than one method. Perhaps someone else can confirm.

    • @ziddy26
      @ziddy26 8 років тому +3

      +MAK AK. You are right. Lambdas can only be used with functional interface.

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

    Thanks for sharing

  • @sagarikadas1196
    @sagarikadas1196 8 років тому

    Fabulous explanation sir

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

    Awesome explanation!!! As usual.

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

    Excellent one sir

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

    Thank you sir!

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

    Good explanation of Lamda..

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

    Well done ! Keep on !

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

    Awesome 💞

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

    Bro you are awesome

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

    Clear Explanation...

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

    Great great great!!!

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

    great video, I totally get it now.

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

    Thank you for the explanation

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

    Thank You Sir
    I Have One Query If We have 2 methods then how we will define it??

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

    Hi Naveen, Thanks for the video. It was a nice explanation. Can you please tell me why the implementing methods of an interface through lambda expressions should have the access modifier as "public" only??

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

    incredible incredible explanation tysm

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

    You didn't ask to subscribe or like but I did anyway...really great video

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

    Thanks :)

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

    Nice Explanation

  • @sridharkovuru78
    @sridharkovuru78 8 років тому

    good stuff keep going thanks for the video

  • @OguzSarigul
    @OguzSarigul 8 років тому

    Great explanation!

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

    Nice explanation! What if the interface has more than one method declared?

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

    Thank you so much sir!!

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

    Awsome ..thanx sir

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

    Awesome...

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

    Thanks dear 😘 ❤️ ☺️ 3 love to u

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

    @3:04 Isn't it mandatory to put @Override on the method in the implementing class?

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

      It's not mandatory in the sense that if you don't use it, you will get an error message.

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

    What have you done I can see your code, the way you define is good

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

    I have doubt if interface has two different methods then how obj=()-> will identify the correct method

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

    i have a doubt. In java 8, we can define methods inside interface.Hence no need for a separate class right? In that case how can we call that method?

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

    Excellent

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

    i have a question here. With lambda expression you are providing implementation for method show() of Interface A in the place where you want to use it (here in main() method). Suppose we implement Interface A in other class, again you need to define implementation for method show() in that new class if you are using lambda expression, so are we not writing duplicate code in every class that implements Interface A when we have same implementation logic ??
    If we have a class as XYZ in your example which provides implementation for show() method, then wherever we want to use the implementation of the method show(), we can create object of class XYZ and call the show() method, we need not write implementation logic in this case.
    Can we get the same support with lambda expression ? without creating a new class XYZ ?

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

    nice

  • @hank3339
    @hank3339 8 років тому

    smooth !!! thank you!

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

    great work

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

    Good

  • @aksaysriram9848
    @aksaysriram9848 8 років тому

    super sir...

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

    thk u sir

  • @VijayKumar-rw1xt
    @VijayKumar-rw1xt 5 років тому

    Hi naveen,
    Can u make video about lambda meta factory

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

    Hey navin, so Lambda expression can be used only with interfaces?

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

    how can we implement if we have two methods in Interface like below using lamda expressions
    interface A{
    void show();
    void lamdaEx();
    }