Java 8 Streams programs you must prepare for Java Interviews

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

КОМЕНТАРІ • 77

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

    Thank you sir for making this video. . To get active and Inactive works in a single Iteration we can use partitionBy() method. Sample Code : employeeList.stream().collect( Collectors.partitioningBy(emp->"active".equalsIgnoreCase(emp.getName())) , It returns Map . At the calling place map.get(true) for active and map.get(false) for inactive.. We have n number of ways it is the one of the way.

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

      Can we do like this also?
      List.stream(). collect (Collectors.groupingBy(Employee: getStatus(), Collectors.counting());
      It will first group by on basis of Active and Inactive and then count it.

  • @SandeepKumar-se2fd
    @SandeepKumar-se2fd 2 роки тому +1

    Great and wonderful example for Stream API.... Great!!!!!

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

    super siva , good keep it up. its 13 years since we met.

  • @maheshuma741
    @maheshuma741 2 роки тому +5

    To calculate dept wise statistics like min,max,average we can use following code : empList.stream.collect(Collectors.groupingBy(Employee::getDeptId, Collectors. summarizingDouble(Employee::getSal))) ; it returns Map . Just for knowledge purpose sharing my thoughts.. Don't take it in another way.

    • @deepa8177
      @deepa8177 10 місяців тому

      thanks fro sharing..

  • @venkatsam2472
    @venkatsam2472 3 роки тому +7

    Wonderful explanation with example. Thank you so much. Will be waiting to see more videos.. 👏🏻👌🏻🙏🏻👍

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    Thank you please make one more video on Java8 coding questions

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

    Thank you for sharing your knowledge with us Sir

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

    Amazing explanation. Thank You 😊. Could have formatted the code. Few parts of code is missing.

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

    Very Nice Video. very well Explained. Thank You.......

  • @deepa8177
    @deepa8177 10 місяців тому

    great video specially quetsion no 5.

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

    Hi Siva, I tried Lambda expression as input for "Comparator.comparing" It was not working

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

    Very nice thanks for sharing 👌🙏

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

    @siva, its very useful for quick review of java 8 streams. Very nice example you taken and explained . 👍 very best and helpful.

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    Excellent video

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

    excellent sir.. Thank you

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

    clear explanation and thanks

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

    Amazing video Shiva much appreciated

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

    Thanks sir, very nicely explained

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    what is the name of the background music?

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

    nice explanation sir

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

    Very helpful videos,make more such java8 programming videos....thanks a lot sir

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    Thanks siva!

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

    Nice video.. very nicely explain.. Can you please explain the reducing function example.

  • @start1learn-n171
    @start1learn-n171 8 місяців тому

    Tq

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

    Sir can you answer this select employee where department is technology and location not equal to mumbai..

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

      filter( e -> "technology".equals(e.getTechnology()) && !( "mumbai".equals(e.getCity()) ) )

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

    U r brilliant sir

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

      Thanks Amit. Please share our UA-cam channel to your friends circle as it may be helpful for them. Happy Learning.

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

      @@SivaReddyJavaTechie Sure Sir

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

  • @pratapjavasingh3239
    @pratapjavasingh3239 3 роки тому +8

    I can request u sir whenever u writing the codes then atleast first explain predefined method apart from that then u can write the code it's request 🙏

    • @SivaReddyJavaTechie
      @SivaReddyJavaTechie  3 роки тому +5

      Hi Pratap, Good suggestion. I make a note of it and will do same for future videos.

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

      @@SivaReddyJavaTechie Thank you 🙏

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    Excellent

  • @user-0987-a
    @user-0987-a 3 роки тому +1

    thanks

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

      Thanks Nagesh. Please refer our UA-cam Channel to your friends and colleagues as it may helpful for them. Happy learning.

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

    Thanks sir very useful

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    NYC information 22:33

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

    Filter?

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

    Sir outer joins practice questions plz..scenario based

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

      Sure. I will upload soon.

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

      @@SivaReddyJavaTechie waiting..I'm still confused abt tht topic...

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

      Sure. I will upload video on the requested topic as soon as possible

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    Nice sir 👌

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

    Sir a git hub link would have been helpful

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

    how to find sum of the salary of each department????

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

      Map mapEmpDept = empList.stream().collect(Collectors.groupingBy(Employee::getDept, Collectors.summarizingInt(Employee::getSalary)));
      mapEmpDept.entrySet().forEach(entry -> System.out.println("Dept:: " + entry.getKey() + " & Sum:: " + entry.getValue().getMin()));

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

    Sir how to get second max salary

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

      //Second Minimum Salary
      empList.stream().sorted(Comparator.comparing(Employee::getEmpSalary)).skip(1).limit(1).forEach(System.out::println);
      //Second Maximum Salary
      myEmployee_Demo.stream().sorted((e1,e2)-> (e1.getEmpSalary() < e2.getEmpSalary()) ? 1 : ((e1.getEmpSalary() == e2.getEmpSalary()) ? 0 : -1)).skip(1).limit(1).forEach(System.out::println);

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

    hi siva,
    can u give code github url?

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    sir plz upload hai video where u would teach run time question only.............Request by your suscriber

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

      The intention is to emphasis on the importance of these programs so that viewers can pay more attention to prepare for the same and will get benefit in the interview.

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    Sir can you help me to slove my assignment programs in Java

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

    Hello Sir ! Thank you for explanation. Q 5) Dept 103 having two employee having same salary 3500, but showing only one employee as a result ?

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html

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

    why using reducing ? we can directly use the maxBy on groupBy DepartmentId. Map maxSalaryByDept = employeeList.stream().collect(Collectors.groupingBy(Employee::getEmployeeDepartmentId, Collectors.maxBy(Comparator.comparing(Employee::getSalary))));
    maxSalaryByDept.forEach((k,v)->{System.out.println("Dept "+k+" Salary "+v);});

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

    sir send the code

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

      HCL Technologies Technical Round | 5+ Years Virtual Interview | Java Developers
      ua-cam.com/video/WmxlNpEfL04/v-deo.html