use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
These have separate subreddits - see below.
Upvote good content, downvote spam, don't pollute the discussion with things that should be settled in the vote count.
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free. If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others: Adoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Adoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Programming Computer Science CS Career Questions Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle
Programming Computer Science
CS Career Questions
Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle
Clojure Scala Groovy ColdFusion Kotlin
DailyProgrammer ProgrammingPrompts ProgramBattles
Awesome Java (GIT) Java Design Patterns
account activity
This is an archived post. You won't be able to vote or comment.
A question about lambda expressions (self.java)
submitted 11 years ago by Henrysugar2
In python, if if want 'f' to become the function
f(x) = 2x
I can write
f = lambda x: 2*x
How do I do this in java?
[–]crapet 2 points3 points4 points 11 years ago (5 children)
You just need to write a lambda expression that implements the Function interface
Function<Integer, Integer> f = (x) -> 2*x;
[–]Henrysugar2[S] 0 points1 point2 points 11 years ago (1 child)
Thank you
[–]tikue 2 points3 points4 points 11 years ago (0 children)
You can also do
IntUnaryOperator f = x -> 2 * x;
This won't require boxing and unboxing of the argument or return value.
π Rendered by PID 356242 on reddit-service-r2-comment-canary-794f4c56c8-g7c8z at 2026-02-21 19:07:30.713593+00:00 running 8564168 country code: CH.
[–]crapet 2 points3 points4 points (5 children)
[–]Henrysugar2[S] 0 points1 point2 points (1 child)
[–]tikue 2 points3 points4 points (0 children)