Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Challenge: Finding the Top 3 Hardest-Working Employees | Section
Stream API in Java
セクション 1.  25
single

single

bookChallenge: Finding the Top 3 Hardest-Working Employees

メニューを表示するにはスワイプしてください

タスク

スワイプしてコーディングを開始

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.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  25
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt