Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Finding the Top 3 Hardest-Working Employees | Intermediate Operations in Stream API
Stream API
course content

Contenido del Curso

Stream API

Stream API

1. Fundamentals and Functional Capabilities of Stream API
4. Practical Applications of Stream API

book
Challenge: Finding the Top 3 Hardest-Working Employees

Tarea

Swipe to start coding

Several employees work at the factory, and we need to identify the three hardest-working employees based on the number of hours worked.

  1. Sort the list of workers in ascending order by the number of hoursWorked using the comparingInt() method.
  2. Reverse the list of workers to make it descending by the number of hoursWorked using the reversed() method.
  3. Select the top three workers with the highest hoursWorked using the limit() method.
  4. Print each of these three workers to the console.

Solución

java

solution

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 10
toggle bottom row

book
Challenge: Finding the Top 3 Hardest-Working Employees

Tarea

Swipe to start coding

Several employees work at the factory, and we need to identify the three hardest-working employees based on the number of hours worked.

  1. Sort the list of workers in ascending order by the number of hoursWorked using the comparingInt() method.
  2. Reverse the list of workers to make it descending by the number of hoursWorked using the reversed() method.
  3. Select the top three workers with the highest hoursWorked using the limit() method.
  4. Print each of these three workers to the console.

Solución

java

solution

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 2. Capítulo 10
Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt