Method Reference In Java 8 - How it really works ?

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

КОМЕНТАРІ • 44

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

    you're the best teacher to teach any concept like a pro, Thank you so much for these sessions. and providing it for free.

  • @bipinsingh1490
    @bipinsingh1490 4 місяці тому +5

    Abhliash i have seen many youtube channel but one think i want to say u are the best and u explain everyconcept verywell with code

  • @lakshmojiseemakurthi2199
    @lakshmojiseemakurthi2199 4 місяці тому +4

    It's like a twist buster at the end, you have mentioned it would work only static and method arguments should match, but the end it it worked with String::UpperCase, which creates an enthusiasm on how it worked.

  • @prasoonmishra3959
    @prasoonmishra3959 4 місяці тому +5

    Bro your videos is really awesome. Very premium content

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

    I've watched many videos on the Stream API, but none have been as clear as this one. Your teaching skills and explanations are excellent. Thank you for sharing such fantastic content.😇😇

  • @keerthanashiyam
    @keerthanashiyam 4 місяці тому

    That was an awesome explanation. I have read articles about method references but I understood it after watching this video only. Thank you for the video. 👏

  • @nikhilraj9524
    @nikhilraj9524 4 місяці тому

    I think you are the best on youtube.

  • @rahulbhatanagar6175
    @rahulbhatanagar6175 4 місяці тому

    Loved your way of explanation. You are really a great teacher😍😇

  • @asifshaikh499
    @asifshaikh499 4 місяці тому +5

    Its very helpful brother, I need deep knowledge of exceptions and multi threading is so helpful for us if you make videos on this 2 topic

    • @SeleniumExpress
      @SeleniumExpress  4 місяці тому

      Sure, Asif ! I will gradually get you those contents.

    • @aibardulatov
      @aibardulatov Місяць тому

      @@SeleniumExpress Yes please. Can you make video about multithreadding?

  • @afzalmd23
    @afzalmd23 Місяць тому

    amazing👍

  • @MalobikaNandy
    @MalobikaNandy 4 місяці тому

    Thanks a lot!! Was eagerly waiting for this. It feels like I can understand most of the things if you explain it. 👍👍

  • @VietNguyen-vj4su
    @VietNguyen-vj4su Місяць тому

    good content!!!

  • @nasimkarpude1388
    @nasimkarpude1388 4 місяці тому +1

    Hi Abhilash.. your videos are awesome... Can you take one session on generics in depth and multi threading as well

  • @mansinghyadav548
    @mansinghyadav548 4 місяці тому

    Knowledgeable video.waiting for stream api new video

  • @abhilashkokkonda1713
    @abhilashkokkonda1713 4 місяці тому

    First half done!

  • @villagesoftwareengineer
    @villagesoftwareengineer 4 місяці тому +5

    Haha, I've been using method-reference, but the light bulb just turned on! 😂😂😂😂

  • @Vithal_Nivargi
    @Vithal_Nivargi 4 місяці тому

    Thanks ❤
    Please keep it up this series 🙏

  • @santhoshchandran6952
    @santhoshchandran6952 4 місяці тому

    Thank You Abhi..😂
    Nice one

  • @nani-yr5ip
    @nani-yr5ip 4 місяці тому

    Thank you abhi!!

  • @sourabhkalaskar-x5l
    @sourabhkalaskar-x5l 4 місяці тому

    @SeleniumExpress
    I've been following this series and the content is incredibly detailed. In the third video, you introduced parallel streams, so I was expecting the next video to cover that topic. However, the latest video is on method references, which feels like a break in the flow. When will you be uploading the video on parallel streams?

  • @smithaakutty124
    @smithaakutty124 4 місяці тому

    1st half done

  • @ajaysubramaniam4453
    @ajaysubramaniam4453 4 місяці тому

    Learned a lot. Big fan of your content! I have a question about method references. The main purpose seems to be code reuse. Since the methods already exist, why not just call them directly using the class name or object? For instance, instead of using a method reference like Collections::sort with an interface variable, we could just use Collections.sort() wherever needed. What specific advantages do method references offer?

    • @pradeepranjan1309
      @pradeepranjan1309 4 місяці тому +1

      Abhilash gave a great example with Collections.sort(), but method references really shine in scenarios involving the Stream API, where you often need to pass behavior as an argument.
      When using methods like filter(), map(), or forEach(), you need to provide a function that can be applied to each element in a stream. This is where method references or lambda expressions come in handy. They make the code more concise and readable.
      For example, if you want to filter a list of strings to find ones that start with a specific letter, you could use:
      List strings = Arrays.asList("apple", "banana", "cherry", "date");
      List result = strings.stream()
      .filter(s -> s.startsWith("a"))
      .collect(Collectors.toList());
      List result = strings.stream()
      .filter(String::isEmpty)
      .collect(Collectors.toList());
      In such scenarios, you can't directly call Collections.sort() since it doesn't fit the functional interface expected by the Stream API methods. Instead, using method references like String::isEmpty or Collections::sort as arguments allows you to seamlessly integrate existing methods into your stream operations.
      So, method references are especially beneficial for improving readability and reusability when working with streams and functional interfaces.
      ---Thanks

  • @santhoshchandran6952
    @santhoshchandran6952 4 місяці тому +3

    Can we expect Parallel stream next week?

  • @abhilashkokkonda1713
    @abhilashkokkonda1713 4 місяці тому

    Yes, I can use it for consumer

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

    Hi avi your content is awesome how to by you course from Pakistan

  • @vijaykorke8837
    @vijaykorke8837 4 місяці тому

    Bro, where had you from last few months? We are waiting for you videos on java..

  • @alwaysLearner9
    @alwaysLearner9 4 місяці тому

    Hi, kindly do video on AOP

  • @Helloworld-vs3ey
    @Helloworld-vs3ey 4 місяці тому

    I tried to buy the microservices boot camp course on your website but it says closed. How can I buy that course. Thank you.

  • @RanjanManas-s7d
    @RanjanManas-s7d 4 місяці тому

    Hii Sir,You are from odisha

  • @darneysam5340
    @darneysam5340 4 місяці тому

    Yes, its return type is void.

  • @srigakolapuatchuthasai6638
    @srigakolapuatchuthasai6638 4 місяці тому

    Thanks abhi ❤

    • @SeleniumExpress
      @SeleniumExpress  4 місяці тому +1

      Welcome! 🤗

    • @srigakolapuatchuthasai6638
      @srigakolapuatchuthasai6638 4 місяці тому

      @@SeleniumExpress Could you please tell me abhi other than this stream API playlist what will be the upcoming videos ?

  • @prabhakarpn427
    @prabhakarpn427 4 місяці тому

    Please continue core java concepts abhilash

  • @abhilashkokkonda1713
    @abhilashkokkonda1713 4 місяці тому

    Where is the answer for how it really works?

  • @abhishekghosh5974
    @abhishekghosh5974 4 місяці тому

    The fake accent, is it really necessary?