top of page

Java 8 stream hidden features

  • Writer: Anand Nerurkar
    Anand Nerurkar
  • Apr 25, 2024
  • 1 min read

we can make use of

Stream.ofNullable - return the same result as above


2.stream.iterate()- create infinite stream, creating certain pattern like 0,2,4,6,8.......

This create infinite stream



To break this infinite stream, we need to add termination, so we make use of limit as below


Collectors.collectingAndThen

to perform addtional transformation on collectors.

for ex: avg salary of employee


stream.takeWhile, stream.dropWhile




Collectors.teeing()

allows you to collect 2 collectors parallel and combine the result.



Collectors.partioningBy

allows you to partition a stream by certain condition


 
 
 

Recent Posts

See All
RFP PRE/POST-PROPOSAL SUBMISSION FLOW

🏆 1. The 5 Pillars to Win a Large Strategic Deal 1. Understand the Client Better Than They Do 👉 Don’t just read RFP — decode it What is their real problem ? What is driving this deal? (compliance, c

 
 
 
DIGITAL LENDING RFP Solution

🎯 RFP Proposal SOLUTION PRESENTATION – DIGITAL LENDING (WITH COLOR-CODED ARCHITECTURE) 1️⃣ Opening “Thank you for the opportunity. I’ll walk you through our approach to building a next-generation dig

 
 
 

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
  • Facebook
  • Twitter
  • LinkedIn

©2024 by AeeroTech. Proudly created with Wix.com

bottom of page