Sort employee by Name, Id and Salary using java 8

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • Sorting Employee class object based on Name Id and salary using java 8 streams #java #sortingalgorithm

КОМЕНТАРІ • 6

  • @Ravikumar-gj6qw
    @Ravikumar-gj6qw Рік тому

    Thanks

  • @sharmahimanshu
    @sharmahimanshu 11 місяців тому

    Explaining the solution a bit more would be better. So that everyone could get it easily. you just jumped over streams, lambda, method reference, adv for loop and comparator.

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

    java 8 show employee name, id, salary in ascending order? can you post

  • @balashankar9720
    @balashankar9720 4 місяці тому

    Is toString method is important or not bro!?

    • @KaretiHariprasad
      @KaretiHariprasad  3 місяці тому

      It is important to override the string() method otherwise object hascode is printed in the comsole

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

    Can you write a program to get top 5 salaries and Employees name given they have Employee ID , Employee NAme , Employee Department , Employee Salary , Employee isActive boolean true property.
    Please explain in easy words and execute and write program using java 8 functional programming features and streams to Pick only the TOP 5 salary and top 5 Employee Name only.
    I tried with this following approach but interviewer rejected me and i am not able to solve. Please explain how to write the solution because i am crying so much.
    public class Employee {
    //id,name,department,salary,isActive;
    //Find out top 5 IT department, e.salary)))));
    }
    }