Method Reference in Java 8 ♨️ | Explained With Examples | Interview QA | JavaTechie

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ม.ค. 2025

ความคิดเห็น • 74

  • @PJ-oz2pg
    @PJ-oz2pg ปีที่แล้ว +3

    Brilliant. Nobody explains like you. Thanks

  • @health.upgradedbyscience.7309
    @health.upgradedbyscience.7309 2 ปีที่แล้ว +4

    So helpful, thanx a lot!! I was struggling on method reference for some days before i came across this excellent video - released just in time! 👍😁

  • @jijojoy4626
    @jijojoy4626 2 หลายเดือนก่อน +1

    best in youtube for metod ref

  • @ramsp35
    @ramsp35 8 หลายเดือนก่อน +1

    Very Good. You explained a long theory just over 30 minutes in simple terms. Thanks for the video.

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

    Gurudevobhava 🙏 Excellent explanation!! And specially Employee::getName 🙏 God bless you 🙏

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

      My pleasure buddy that i am able to explain in proper way

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

      @@Javatechie you explain so good because you very good knowledge and skills to explain!!! God bless you 🙌

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

    Awesome Explanation with example....! 😊👌👍

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

    Thanks a lot!!!! Concept was explained in very interesting and detailed way.

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

    Excellent boss, Kudos

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

    Excellent job 🎉

  • @ahmedabdelhakim-x2h
    @ahmedabdelhakim-x2h 7 หลายเดือนก่อน

    Great explanation

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

    You are really Great and AWESOME….😊

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

    Your tutorials are just awesome...

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

    You have skill teaching.

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

    Thanks for the simple explanation!

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

    Thanks a lot for helping here

  • @SHAHIDKUMAR-kd7vu
    @SHAHIDKUMAR-kd7vu 2 ปีที่แล้ว +1

    really its great video

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

    Nice explanation 👍🏻😊

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

    Hello from finland. Hei suomesta ja kiitos😍

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

    we want it you got it, Godly content!!

  • @Aniruddhdwivedi
    @Aniruddhdwivedi 2 ปีที่แล้ว +5

    Hi Basant, eagerly waiting for the video series of Java 17 from you ... thanks in advance

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

      Okay i will upload it

  • @shubhamh8771
    @shubhamh8771 ปีที่แล้ว

    Thankyou for Explanation.

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

    Impressive

  • @JackSon-lj3on
    @JackSon-lj3on 2 ปีที่แล้ว +1

    Good explanation..

  • @ramakrishna-lz3ep
    @ramakrishna-lz3ep 2 ปีที่แล้ว +1

    Super expiation

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

    Nicely explained!

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

    Your videos are great as always. ❤️

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

    It Awesome!. Can you make one video for MapStruct

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

    Hi Brother, Thanks for this series,
    Could you please make a video on Java 8 grouping by.
    Thanks in advance!!

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

    interview question @29:43

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

    Bhaiya mzza aagya, are println static nahi hei😂😂😂😂

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      🤪 static to hai println

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

    Superb 🌻...also please do a video DTO's in springboot in my project we've using DTO's I am unable to get the use and purpose of implementing DTO's 😭 please do a small video if possible 🧡

  • @mdsaquibansari4123
    @mdsaquibansari4123 ปีที่แล้ว

    Thanks

  • @sujitkumar2196
    @sujitkumar2196 11 หลายเดือนก่อน

    Awesome bro, but the source link you posted is not a correct one.
    can you please share the source code with us?

    • @Javatechie
      @Javatechie  11 หลายเดือนก่อน

      Let me check and update

  • @sm8817
    @sm8817 8 หลายเดือนก่อน

    Sir can we get the code which u are using to explain ?

  • @ElonMusk-wo7zf
    @ElonMusk-wo7zf ปีที่แล้ว +1

    What if Instance method has arguments, can we use it with class reference?

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

      Yes we can like String::toUpperCase

    • @ElonMusk-wo7zf
      @ElonMusk-wo7zf ปีที่แล้ว

      @@Javatechie Please give an example for Method reference where the method takes multiple arguments.

  • @LoveToLearnanilappana
    @LoveToLearnanilappana 10 หลายเดือนก่อน

    out::println is instance method reference right correct me if im wrong

  • @sureshmanne7245
    @sureshmanne7245 ปีที่แล้ว

    In the last minute you are printing the ids from ArrayList but they are empty, why? What to do to show ids?

  • @krishnamohan5771
    @krishnamohan5771 ปีที่แล้ว

    is foreach accepts consumer only right? but you are calling static method ref

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

    Hello Sir how this is working Employee::getName , as we know we can't call a non static method using the above syntax. It's bit confusing. Can anyone help me to understand this concept

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Please check the video again. I have explained the same question over there

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

      @@Javatechie Ok Sir Thank you so much for providing the good content. Really because of your videos only I am able to start with Spring Boot.

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Good to hear this 😃. Keep learning

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

    What are VO and DTO classes

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

      Value object and data transfer object. Both are the same who hold request attribute

  • @AbhishekGupta-fi2wp
    @AbhishekGupta-fi2wp 2 ปีที่แล้ว +1

    Is kafka videos are coming for begineers?

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

      Yes will start from very basic level

    • @AbhishekGupta-fi2wp
      @AbhishekGupta-fi2wp 2 ปีที่แล้ว

      @@Javatechie when can i expect please i really want to learn

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

      @@AbhishekGupta-fi2wp next week onwards i will upload

  • @javatamilan
    @javatamilan 8 หลายเดือนก่อน

    .min((Integer::compareTo)); but in this example compareto contains method parameter even though how can I access directly without creating object could you explain it

    • @Javatechie
      @Javatechie  8 หลายเดือนก่อน

      Not getting your question? Where did we create an object?

    • @javatamilan
      @javatamilan 8 หลายเดือนก่อน

      @@Javatechie Optional maximumNumber = numbers         .stream()         .filter(Objects::nonNull)// It filter non null elements         .max((Integer::compareTo)); // returns maximum number and through exception if the element is null it filters non-null elements          Optional minNumber = numbers         .stream()         .filter(Objects::nonNull)// It filter non null elements         .min((Integer::compare));
      Compare is a static method we can Directly access by using class name but compareTo method is a non static method but how can we accessed by using class name but it contains also the method parameter you said that we can't able to access that method by using class name by method reference if the method contains method parameter

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

    Hi bro, Thank you for the video on method reference.
    Kindly help me to understand
    Reference to an instance method of an arbitrary object of a particular type with below example.
    Example:
    String [] array = {"Code","Java","C++"};
    Arrays.sort ( array, String:: compareToIgnoreCase);
    In this example ,String Class compareToIgnoreCase method having arguments then
    How ClassName:: instance method working here. Kindly help with this

    • @aurelienfredytakoutene7114
      @aurelienfredytakoutene7114 ปีที่แล้ว

      @javatechie why didn't you answer this question please? I also found it pertinent.

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      If it takes a single argument of the type which you are getting from the stream then it will work

    • @krishnamohan5771
      @krishnamohan5771 ปีที่แล้ว

      I think it is taking String as object literal

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

    Sir there is and arbitorary method refrence . I have seen many place . Please cover that. I realy do not underatand it

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      Okay but that is kind of predefined method for example String::toUpperCase

  • @bindu6790
    @bindu6790 ปีที่แล้ว

    Little bit confusing

    • @Javatechie
      @Javatechie  ปีที่แล้ว

      What's your confusion

  • @naoryehuda6830
    @naoryehuda6830 7 หลายเดือนก่อน

    Your native accent is very bad,

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

    Nice tutorial. Please share reason for map(ArrayList::new) in the following line you showed at the very end:
    It just prints empty ArrayList as many times as the number of employees. Not sure the intent of printing empty list. Thanks
    ______
    service.loadEmployeesFromDB().stream().map(Employee:getId).map(ArrayList::new).f
    orEach(System.out.println);