Skip to content

Proposing different approach to sum numbers #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2025

Conversation

The-Wardaddy
Copy link
Contributor

  • Updated MediumNumbersProblemSolution.java

There is a boxing cost while doing arithmetic operations on Wrapper types. Although it wouldn't make much difference for this learning exercise but just wanted to propose this small change as many new developers will read this guide.

Book reference

"5.7 Numeric Streams" of Modern Java in Action—Lambdas, Streams, Reactive and Functional Programming - Manning Publications Co.

- Updated MediumNumbersProblemSolution.java

There is a boxing cost while doing arithmetic operations on Wrapper types. Although it wouldn't make much difference for this learning exercise but just wanted to propose this small change as many new developers will read this guide.
@ZahidFKhan
Copy link
Owner

Thanks for your valuable contribution!

You're right about the Stream and IntStream. And it makes sense.

@ZahidFKhan ZahidFKhan merged commit 194b0c5 into ZahidFKhan:main Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants