Java8 ||Anonymous Inner Class vs Lambda Expressions || Session - 4 || On 03-08-2018 by Durga Sir

Поділитися
Вставка
  • Опубліковано 16 січ 2025

КОМЕНТАРІ • 79

  • @shubhamagarwal1434
    @shubhamagarwal1434 Рік тому +11

    There are only 2 GOD's Of Java In India & Maybe Whole World. One is Ramesh Sr From LARA Tech Banglore & Other Is DURGA Sr From DurgaSoftwareSolution Hydrabad. Thanks For The Multiverse GOD Sri Hari Vishnu - He Inspired One Of The GOD To Give Free Education On UA-cam...Feeling Blessesd.

    • @aaravrubral
      @aaravrubral Рік тому +2

      Bro how can you forget Harikrishna sir from Naresh IT Hyderabad

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

    I want to give thank you sir for your effort you are giving to provide us unique and in-depth logical content
    we are able to get very much confidence because of you
    I will pray to GOD that your ambition , your aim, your mission you will achieve soon
    Thank You for all your videos

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

      Hello Saddam.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      Use the below links to access Durga Sir Videos and Downloadable Materials with Life-Time Access.
      1. Java 8 New Features In Simple Way
      Link: goo.gl/F2NfZi
      2. Java 9 New Features In Simple Way : JShell, JPMS and More
      Link: goo.gl/s9PP1p
      3. Complete JDBC Programming Part-1
      Link: goo.gl/uT9sav
      4. Complete JDBC Programming Part-2
      Link: goo.gl/VmhM7t
      Regards
      DURGASOFT Online Team
      +918885252627,7207212428/27
      durgasoftonlinetraining@gmail.com

    • @reshmashastrimath4575
      @reshmashastrimath4575 Рік тому

      Hu⁰0⁰0ppp00⁰⁰00pp0p0000⁰⁰⁰⁰0⁰⁰

  • @sumitjain3526
    @sumitjain3526 Рік тому +1

    sir aapka koi jawaab nahi...Excellent

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

    My best teacher as of now is Durga Sir. your energy, your teaching style is very unique and outstanding. I get confidence in java because of you Sir. Thank your effort sir. It is very helpful..

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

      Hello Prasenjit,
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      Use the below links to access Durga Sir Videos and Downloadable Materials with Life-Time Access.
      1. Java 8 New Features In Simple Way
      Link: goo.gl/F2NfZi
      2. Java 9 New Features In Simple Way : JShell, JPMS and More
      Link: goo.gl/s9PP1p
      3. Complete JDBC Programming Part-1
      Link: goo.gl/uT9sav
      4. Complete JDBC Programming Part-2
      Link: goo.gl/VmhM7t
      Regards
      DURGASOFT Online Team
      +918885252627,7207212428/27
      durgasoftonlinetraining@gmail.com

  • @rohitgupta025
    @rohitgupta025 5 років тому +4

    Sir you are the best...thank you for sharing valuable knowledge with us....I am thankful to UA-cam also...without this platform I would have never get a chance to know who Durga sir is...and how good and simple can be to understand Java ..thank you sir

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

      Hello Rohit.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

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

    I would really want to thank you for all your efforts in teaching so nicely .You are an awesome teacher.

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

      Hello Mishra.
      Hello Friends,
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      Use the below links to access Durga Sir Videos and Downloadable Materials with Life-Time Access.
      1. Oracle Java Certification: Shortest Way To Crack OCA 1Z0-808
      Link: goo.gl/vcMKjz
      2. Java 8 New Features In Simple Way
      Link: goo.gl/F2NfZi
      3. Java 9 New Features In Simple Way : JShell, JPMS and More
      Link: goo.gl/s9PP1p
      4. Complete JDBC Programming Part-1
      Link: goo.gl/uT9sav
      5. Complete JDBC Programming Part-2
      Link: goo.gl/VmhM7t
      Regards
      DURGASOFT Online Team
      +918885252627, 7207212427/28
      durgasoftonlinetraining@gmail.com

  • @manikmahato1958
    @manikmahato1958 11 місяців тому +1

    You are the ❤ of all the Java Developers sir..

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

    Sir u are god of java u teach every concept in a very easy way thanks for ur efforts and I learned a lot from u❤️

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

      Hello Friend.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

  • @Gautam_USA
    @Gautam_USA Рік тому +2

    Durga sir ❤🎉 magic'... Love you sir 🙏🙏🙏❤️‍🔥

  • @hiteshsharma9192
    @hiteshsharma9192 Рік тому +1

    Your way of teaching is excellent I am getting confidence.thank you sir you are true genius

    • @DurgaSoftwareSolutions
      @DurgaSoftwareSolutions  Рік тому +1

      Hello Hitesh.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

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

    21:35 -> Anonymous Inner Classes Vs Lambda Expression

  • @sahilgogna3393
    @sahilgogna3393 4 роки тому +2

    My Java Guru! Thanks for explaining everything so clearly.

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

      Hello Sahil.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

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

    Best Guru in my life

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

      Hello Biswajit.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

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

    Crystal clear explanations, Always! Thank you sir.

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

      Hello Suraj.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

  • @ranveermalhotra5650
    @ranveermalhotra5650 Рік тому +1

    Thanks for such clear explanation

    • @DurgaSoftwareSolutions
      @DurgaSoftwareSolutions  Рік тому

      Hello Friend.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

  • @sachinkumarsingh538
    @sachinkumarsingh538 5 років тому +2

    sir u didn't mention that its better to use lambda expression as compared to anonymous class in case of functional interface as it won't create an extra dot class

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

    Excellent Content.

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

      Hello Vrushbh.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

  • @tvlogs7441
    @tvlogs7441 Рік тому +1

    Dear Durga Sir, what is the issue with this
    // Functional interface for adding two numbers
    interface AddNumbers {
    int add(int a, int b);
    }
    public class LambdaDemo {
    public static void main(String[] args) {
    Thread a = new Thread() {
    public void run() {
    // TODO: Actual code to be executed in the thread
    }
    };
    AddNumbers addNumbers2 = new AddNumbers() {
    @Override
    public int add(int a, int b) {
    return a + b;
    }
    };
    AddNumbers addNumbers = (a, b) -> a + b;
    }
    }
    error :Lambda expression's parameter a cannot redeclare another local variable defined in an enclosing scope. This happens If I am creating a Thread class object as anonymous . Please explain . Durga Sir only can explain the concept here

    • @DurgaSoftwareSolutions
      @DurgaSoftwareSolutions  Рік тому

      Hello Friend.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    Your teaching skill is excellent sir... your my java guru ..on spring and spring boot pls make videos sir it's request to you sir...

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

      Hello Kajol.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

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

    Durga sir is legend

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

      Hello Murali.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

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

    someone please help....
    at 15:21 Collections.sort( l, (e1,e2)->(e1.enoe2.eno ? 1 : 0)
    my doubt is that.. how the "int comparator(T a, T b);" is knowing the type of e1,e2 you didn't declare their types anywhere.
    in your previous videos you had used
    Comparator c = (e1,e2) -> (e1.enoe2.eno ? 1 : 0) so it was clear that e1,e2 will be treated as objects of Employee class.

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

      Hello Vivek.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

  • @patrisagar6548
    @patrisagar6548 10 місяців тому +2

    50:48 only 1st option correct

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

    Thanks sir

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

    At 18:00 you have used sort method with lambda expression for employee objects.but Employee does not implement Comparator.How is sort method accepting this?

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

      Classes do not need to implement Comparator for themselves. Comparable interface is for the class to implement to define a natural sorting order for objects of that class. Any number of Comparator classes can be defined to do custom sort orders for a class of objects. This is fundamental difference between Comparable and Comparator, which is a common interview question and a source of tricky questions on the OCJP exams.

  • @hemanthkumarboyina6188
    @hemanthkumarboyina6188 5 років тому +3

    I sir.. Please do the vedio on Java 8 Streams and other features

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

    Hello sir, where I can find the notes for all video lectures. Thanks you.

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

      Hello Dev.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

      @@DurgaSoftwareSolutions Yes sure sir, and thank you for all your efforts you are simply awesome.

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

    superb sir

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

      Hello Friend.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New Feature Videos by Durga sir in the following link:
      goo.gl/ujVNJH

  • @devendrajoglekar2406
    @devendrajoglekar2406 4 роки тому +2

    i am facing error at e1.name is
    cannot find symbol
    symbol: variable name
    location: variable e1 of type Object

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

      Hello Devendra.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

      You have to typecast it as name variable is not present in object class

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

    Hello Durga Sir,
    When will you start with the competitive programming concepts?

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

      Hello Pratap.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

  • @balu0289
    @balu0289 5 років тому +2

    Comparator has two methods compare() and equals() and both are abstract methods, then how come we call it as functional interface and implement lambda expression on it. Please clarify. Thanks

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

      Hello Balu.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

    • @sarangkumar3803
      @sarangkumar3803 4 роки тому +2

      equals() method is already implemented in Object class .

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

    Without giving comparator...how can we pass the variables ..how it knows which interface it is calling !!

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

      Hello Swetha.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    owsm explanation sir

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

      Hello Navkant.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      You can view all other Java 1.8 New FeatureVideos by Durga sir in the following link:
      goo.gl/ujVNJH

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

    is lambda expression method returns or creates new object(in it's FI type) ??

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

      Hello Tharsan.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

      interfaces don't have objects ig

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

    Can we create anonymous class for the class which is final

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

      Hello Rajat.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    Anonymous is power full than Lamda Expression. But can I know What is reason to provide lambda expression in Java 1.8 ?

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

      Hello Sreeram.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    How to sort alphabetically in descending order?

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

      Hello Supraja.
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

      Collections.sort(list l,(s,s2)->s2.compareTo(s2));

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

    in emplyoee example.....we dont need to create functional interface reference..?? like this Comparator c=(e1,e2)->(e1.enoe2.eno?1:0).......

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

    This is great. do u have any course on CICD?

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

      Hello Ayon Sarkar.
      Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
      For CICD course details,
      Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28

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

    If lambda expression contains only one argument AND WE DO NOT WANT TO DECLARE ITS TYPE then parenthesis are optional.

  • @Code_JAVA268
    @Code_JAVA268 10 місяців тому +1

    prooooo

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

    import java.util.*;
    class Employee implements Comparable
    {
    String name;
    Integer eno;
    Employee(String name, Integer eno){
    this.name = name;
    this.eno = eno;
    }
    //DOUBT, HOW TO MAKE COMPILER AWARE THAT compareTo() METHOD IS IMPLEMENTED BELOW.? RIGHT NOW IT GIVES COMPILE TIME ERROR.
    Comparable c = base -> -this.eno.compareTo(base.eno);

    public String toString(){
    return this.name + " " + this.eno;
    }

    }

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

    Any one have java 8 and java9

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

      Hello Veerendranath.
      Use the below links to access Durga Sir Videos and Downloadable Materials with Life-Time Access.
      1. Oracle Java Certification: Shortest Way To Crack OCA 1Z0-808
      Link: goo.gl/vcMKjz
      2. Java 8 New Features In Simple Way
      Link: goo.gl/F2NfZi
      3. Java 9 New Features In Simple Way : JShell, JPMS and More
      Link: goo.gl/s9PP1p
      4. Complete JDBC Programming Part-1
      Link: goo.gl/uT9sav
      5. Complete JDBC Programming Part-2
      Link: goo.gl/VmhM7t
      Regards
      DURGASOFT Online Team
      +918885252627, 7207212427/28
      durgasoftonlinetraining@gmail.com