Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Ensuring Fast Delivery for Expensive Products | Terminal Operations in the Stream API
Stream API

Swipe to show menu

book
Challenge: Ensuring Fast Delivery for Expensive Products

Task

Swipe to start coding

In the store, there's a rule: if a product costs more than $1000, it must be delivered within 5 days. You need to check whether this rule is followed for all expensive products.

  1. Filter the list of products, keeping only those with a price greater than 1000 using filter() method.
  2. Check if all filtered products have a delivery time of 5 days or less using allMatch().

Solution

java

solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 13
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

Awesome!

Completion rate improved to 2.33

book
Challenge: Ensuring Fast Delivery for Expensive Products

Task

Swipe to start coding

In the store, there's a rule: if a product costs more than $1000, it must be delivered within 5 days. You need to check whether this rule is followed for all expensive products.

  1. Filter the list of products, keeping only those with a price greater than 1000 using filter() method.
  2. Check if all filtered products have a delivery time of 5 days or less using allMatch().

Solution

java

solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

close

Awesome!

Completion rate improved to 2.33

Swipe to show menu

some-alt