Method Reference In Java 8 - How it really works ?

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

КОМЕНТАРІ • 40

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

    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

  • @asutoshkumar676
    @asutoshkumar676 16 днів тому

    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.😇😇

  • @lakshmojiseemakurthi2199
    @lakshmojiseemakurthi2199 Місяць тому +3

    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.

  • @asifshaikh499
    @asifshaikh499 Місяць тому +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  Місяць тому

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

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

    Bro your videos is really awesome. Very premium content

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

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

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

    I think you are the best on youtube.

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

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

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

    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. 👏

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

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

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

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

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

    Knowledgeable video.waiting for stream api new video

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

    Yes, I can use it for consumer

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

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

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

    Can we expect Parallel stream next week?

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

    1st half done

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

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

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

    First half done!

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

    Thanks ❤
    Please keep it up this series 🙏

  • @depthprogramming9751
    @depthprogramming9751 2 дні тому

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

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

    Thank You Abhi..😂
    Nice one

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

    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 Місяць тому +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

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

    Thank you abhi!!

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

    Hi, kindly do video on AOP

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

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

  • @user-en5nc6rp1m
    @user-en5nc6rp1m Місяць тому

    Hii Sir,You are from odisha

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

    Please continue core java concepts abhilash

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

    Where is the answer for how it really works?

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

    Yes, its return type is void.

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

    Thanks abhi ❤

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

      Welcome! 🤗

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

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

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

    The fake accent, is it really necessary?