Lambda Expression in Java 8

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 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. 😄

  • @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.

  • @anonymous-do5bs
    @anonymous-do5bs 7 ปีที่แล้ว +174

    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.

  • @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

  • @rishnp
    @rishnp 2 ปีที่แล้ว +1

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

  • @shubhamtandon3045
    @shubhamtandon3045 5 หลายเดือนก่อน

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

  • @MrFxJ
    @MrFxJ 6 ปีที่แล้ว +1

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

  • @piyalichatterjee6657
    @piyalichatterjee6657 4 ปีที่แล้ว

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

  • @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

  • @ashwanikumar4288
    @ashwanikumar4288 6 ปีที่แล้ว

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

  • @cokechan1956
    @cokechan1956 3 ปีที่แล้ว +2

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

  • @jitrulz1
    @jitrulz1 4 ปีที่แล้ว +1

    Amazing is the only word. demystified Lambda. Thankyou.

  • @LillEngineered
    @LillEngineered 8 ปีที่แล้ว

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

  • @contactamartya
    @contactamartya 6 ปีที่แล้ว

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

  • @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 !

  • @amoodi
    @amoodi 6 ปีที่แล้ว

    Best video to understand Lambda expressions.

  • @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...

  • @JaswiSaharsh
    @JaswiSaharsh 3 ปีที่แล้ว

    Great Explanation Mr.Naveen . Thank you.

  • @philomath_u
    @philomath_u 2 ปีที่แล้ว

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

  • @soneejaiswal4109
    @soneejaiswal4109 6 ปีที่แล้ว

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

  • @sabihakhan3456
    @sabihakhan3456 5 ปีที่แล้ว

    Excellent example & explaination

  • @apstamp4560
    @apstamp4560 4 ปีที่แล้ว

    Wonderfully explained! Thank you so much!

  • @YokoYokoOneTwo
    @YokoYokoOneTwo 3 ปีที่แล้ว

    Super understandable even for non english speakers

  • @himanshuchugh4257
    @himanshuchugh4257 5 ปีที่แล้ว +1

    Mind blowing explanation

  • @positivevibes1769
    @positivevibes1769 4 ปีที่แล้ว

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

  • @abguven
    @abguven 4 ปีที่แล้ว

    Thanks a lot.Very good explanation.

  • @vijayjangid8967
    @vijayjangid8967 4 ปีที่แล้ว

    you helping in my career so much! thanks

  • @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

  • @rajnava944
    @rajnava944 2 ปีที่แล้ว

    Excellent explanation. thank you

  • @SubhadipBanerjeeSBHDP
    @SubhadipBanerjeeSBHDP 4 ปีที่แล้ว

    Awesome Explanation

  • @waqardetho2426
    @waqardetho2426 7 ปีที่แล้ว +8

    this was a great way of explaining.

  • @gowthamisasanapuri9980
    @gowthamisasanapuri9980 3 ปีที่แล้ว

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

  • @mayankmoolchandani7976
    @mayankmoolchandani7976 6 ปีที่แล้ว +30

    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");

  • @VijayKumar-qf9rp
    @VijayKumar-qf9rp 4 ปีที่แล้ว

    Great explanation... Congrats sir

  • @mohdaasimansari9489
    @mohdaasimansari9489 2 ปีที่แล้ว

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

  • @shrutikumari6727
    @shrutikumari6727 3 ปีที่แล้ว

    Thanks Sir,for the proper and the best explanation.

  • @sharifulislam-pd3sj
    @sharifulislam-pd3sj 5 ปีที่แล้ว

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

  • @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

  • @EgoCrusher819
    @EgoCrusher819 6 ปีที่แล้ว

    Really good and simple explanation

  • @sagarikadas1196
    @sagarikadas1196 8 ปีที่แล้ว

    Fabulous explanation sir

  • @fakhraldensati1626
    @fakhraldensati1626 6 ปีที่แล้ว

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

  • @sreerekhamenon1164
    @sreerekhamenon1164 3 ปีที่แล้ว

    Nice content. thanks for the info.

  • @varunjohnjohn
    @varunjohnjohn 4 ปีที่แล้ว

    great explanation..

  • @sameerforyou01
    @sameerforyou01 4 ปีที่แล้ว

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

  • @TamilselviR-d6f
    @TamilselviR-d6f 5 หลายเดือนก่อน

    Very well explained.thankyou.keep posting videos like this

  • @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?*

  • @JavaSpringyFun
    @JavaSpringyFun 5 ปีที่แล้ว

    Good explanation of Lamda..

  • @tejach4567
    @tejach4567 6 ปีที่แล้ว

    Clear Explanation...

  • @meenakshisundaram3231
    @meenakshisundaram3231 5 ปีที่แล้ว

    Excellent one sir

  • @sujanbista5117
    @sujanbista5117 3 ปีที่แล้ว

    wah mazza agaya

  • @mab2278
    @mab2278 6 ปีที่แล้ว

    Awesome explanation!!! As usual.

  • @04minutes53
    @04minutes53 8 ปีที่แล้ว +1

    great work keep it up

  • @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

  • @nouranryalat163
    @nouranryalat163 6 ปีที่แล้ว

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

  • @vladanulardzic5859
    @vladanulardzic5859 5 ปีที่แล้ว

    Well done ! Keep on !

  • @hamidja1537
    @hamidja1537 2 ปีที่แล้ว

    Thanks for sharing

  • @PraphullaJadhav
    @PraphullaJadhav 4 ปีที่แล้ว

    Thank you sir!

  • @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.

  • @parthdalvi5855
    @parthdalvi5855 7 ปีที่แล้ว

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

  • @coskunkerim987
    @coskunkerim987 6 ปีที่แล้ว

    Thank you for the explanation

  • @OguzSarigul
    @OguzSarigul 8 ปีที่แล้ว

    Great explanation!

  • @aboodhs4556
    @aboodhs4556 3 ปีที่แล้ว

    Great great great!!!

  • @ashu7pathak
    @ashu7pathak 4 ปีที่แล้ว

    Thanks :)

  • @unemployedcse3514
    @unemployedcse3514 4 ปีที่แล้ว

    Awesome 💞

  • @madhes23
    @madhes23 4 ปีที่แล้ว

    Nice Explanation

  • @arturpabjanczyk6081
    @arturpabjanczyk6081 7 ปีที่แล้ว

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

  • @shubhamtandon5191
    @shubhamtandon5191 2 ปีที่แล้ว

    Bro you are awesome

  • @eug_gino
    @eug_gino 5 ปีที่แล้ว

    incredible incredible explanation tysm

  • @31bikashdash
    @31bikashdash 8 ปีที่แล้ว +1

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

  • @sujithkumar2337
    @sujithkumar2337 3 ปีที่แล้ว +1

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

  • @aakashgoyal1812
    @aakashgoyal1812 4 ปีที่แล้ว

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

  • @m.praveenkumar3702
    @m.praveenkumar3702 6 ปีที่แล้ว +2

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

  • @kamarony8572
    @kamarony8572 6 ปีที่แล้ว

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

  • @nupurdeshpande2889
    @nupurdeshpande2889 5 ปีที่แล้ว

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

  • @ThefamousMrcroissant
    @ThefamousMrcroissant 6 ปีที่แล้ว

    Excellent

  • @MrCodix
    @MrCodix 7 ปีที่แล้ว

    great video, I totally get it now.

  • @deshengli
    @deshengli 5 ปีที่แล้ว

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

  • @cocoa8373
    @cocoa8373 5 ปีที่แล้ว

    Thanks man for the best breakdown and example!

  • @jain7497
    @jain7497 7 ปีที่แล้ว

    Awsome ..thanx sir

  • @sagarmeena0210
    @sagarmeena0210 5 ปีที่แล้ว +1

    nice

  • @1996Pinocchio
    @1996Pinocchio 6 ปีที่แล้ว

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

  • @manojrajput6481
    @manojrajput6481 4 ปีที่แล้ว

    Awesome...

  • @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??

  • @psudhakarreddy6548
    @psudhakarreddy6548 3 ปีที่แล้ว +1

    Good

  • @akshaynilkanth9671
    @akshaynilkanth9671 5 ปีที่แล้ว

    Thank you so much sir!!

  • @radhashyamnayak4942
    @radhashyamnayak4942 6 ปีที่แล้ว

    thank you

  • @aksaysriram9848
    @aksaysriram9848 8 ปีที่แล้ว

    super sir...

  • @manojmehra5916
    @manojmehra5916 7 ปีที่แล้ว

    great work

  • @souravraghuvanshi4833
    @souravraghuvanshi4833 6 ปีที่แล้ว

    U r God ✌💪

  • @sridharkovuru78
    @sridharkovuru78 8 ปีที่แล้ว

    good stuff keep going thanks for the video

  • @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?

  • @VijayKumar-rw1xt
    @VijayKumar-rw1xt 5 ปีที่แล้ว

    Hi naveen,
    Can u make video about lambda meta factory

  • @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 ?

  • @nikhilhinge7489
    @nikhilhinge7489 4 ปีที่แล้ว

    thk u sir

  • @hank3339
    @hank3339 8 ปีที่แล้ว

    smooth !!! thank you!

  • @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.

  • @syedmuhammadkashifalam4242
    @syedmuhammadkashifalam4242 4 ปีที่แล้ว

    great

  • @xoda345
    @xoda345 5 ปีที่แล้ว

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