J AVA 8 S T R E A M A P I
MOST ASKED
INTERVIEW QUESTION
Problem : Find the word with maximum frequency from a
string
I/p : “amit is a developer amit in it and amit is java
developer"
O/p : amit = 3
Step 1 : Split the string into words
Step 2 : Convert words into Stream
Step 3 : Group words and count frequency
Step 4 : Find the word with maximum frequency
Step 5 : Print the result
<Program />
<>THANK YOU
FOR LISTENING </>
Problem: Find the word with maximum frequency from a
string
I/p : “amit is a developer amit in it and amit is java
developer"
O/p : amit = 3