Using streams, print the odd numbers between 1 and 10 that are greater than 5.

AnswerBot
1y

Using Java streams to print odd numbers between 1 to 10 and greater than 5

  • Use IntStream.range() to generate numbers from 1 to 10

  • Filter the numbers using filter() to get odd numbers

  • Use filter() again t...read more

Anonymous
1y
IntStream.rangeClosed(0,10).boxed().toList().stream().filter(i -> i%2!=0 && i >5).forEach(System.out::println);
Help your peers!
Select
Add answer anonymously...

LTIMindtree Senior Software Engineer interview questions & answers

A Senior Software Engineer was asked 2mo agoQ. How would you optimize a React application?
A Senior Software Engineer was asked 2mo agoQ. Write code using Java 8 streams to solve a problem.
A Senior Software Engineer was asked 2mo agoQ. Can multiple databases be connected to the same integration node?

Popular interview questions of Senior Software Engineer

A Senior Software Engineer was asked 2mo agoQ1. How would you optimize a React application?
A Senior Software Engineer was asked 2mo agoQ2. Write code using Java 8 streams to solve a problem.
A Senior Software Engineer was asked 2mo agoQ3. Can multiple databases be connected to the same integration node?

Top HR questions asked in LTIMindtree Senior Software Engineer

A Senior Software Engineer was asked 2w agoQ1. What major technical challenge did you overcome in your current project?
A Senior Software Engineer was asked 3mo agoQ2. Can you describe the projects you worked on in your last company?
A Senior Software Engineer was asked 4mo agoQ3. What was the reason you provided for your almost one-year career gap?
LTIMindtree Senior Software Engineer Interview Questions
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits