Java 8 coding interview questions - Employee Management System | Real time Interview Questions

Поделиться
HTML-код
  • Опубликовано: 30 май 2024
  • #javainterviewquestionsanswers #javainterview #java8 #javastreams
    Hello All,
    In this video we will see top 10 Java interview questions on stream API topic.
    Question 1 :
    Print the employee having the highest salary .
    Solution:
    Employee employee = empList.stream().
    collect(Collectors.maxBy(Comparator.comparingDouble(Employee::getSalary))).get();
    System.out.println(employee);
    Question 2:
    How many male and female employees are there in the list.
    Question 3:
    How many employees are there in per department.
    To solve above two questions we will use groupingBy method.
    Thank you !

Комментарии • 3

  • @UmmakajJagadish
    @UmmakajJagadish 5 дней назад

    Can you make a video on spring security logging and Exception handling for spring boot project

    • @SJProgrammingSolutions
      @SJProgrammingSolutions  4 дня назад

      Hello , Please watch this video for Exception Handling in spring Boot ruclips.net/video/rkEYmvPaCZs/видео.htmlsi=qArmfYyfc81F06Bu

    • @SJProgrammingSolutions
      @SJProgrammingSolutions  4 дня назад

      Will make video for spring security and logging , Thank you !