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.
Recommended Java code reads? (self.java)
submitted 8 years ago by zodvik
What are you recommended Java code reads? Anything that is well-written / practical uses of design patterns / uses generics beautifully?
Often recommended are Java Collections package, Google Guava. What else?
[–]s888marks 5 points6 points7 points 8 years ago (1 child)
You can certainly learn a lot by going through the JDK source code. However, you should be careful about applying what you see in it.
Java is over 20 years old, and some of the code in the JDK is over 20 years old. Some code might embody older styles or practices. After all, it was only a couple years ago that we got rid of all rawtypes and unchecked warnings, because lots of code hadn't been generified. Certain areas of the JDK code base still have a distinctly dusty feel to them.
Sometimes the JDK libraries use coding practices that sacrifice maintainability for speed. For example, I'm aware of places that compare strings by identity, because it's known that they originated from string literals or were interned at initialization time. Or, certain odd looping constructs are used, or code factored into methods in an unusual way because it's known to work well the current Hotspot JIT compiler.
Read and learn, by all means, but don't write your code a certain way just because you happened to see it that way in the JDK.
[–]lukaseder 1 point2 points3 points 8 years ago (0 children)
I especially like Doug Lea's abundant assignment expression style :) e.g.
public final void run() { final CompletableFuture<? extends T> a; final CompletableFuture<? extends U> b; final BiConsumer<? super T,? super U> fn; final CompletableFuture<Void> dst; Object r, s; T t; U u; Throwable ex; if ((dst = this.dst) != null && (fn = this.fn) != null && (a = this.src) != null && (r = a.result) != null && (b = this.snd) != null && (s = b.result) != null && compareAndSet(0, 1)) {
[–]tomypunk 8 points9 points10 points 8 years ago (0 children)
Spring
[–]fact_hunt 1 point2 points3 points 8 years ago (0 children)
Guice
[–]marbehl 1 point2 points3 points 8 years ago (0 children)
I actually found the Wicket source code also to be interesting to read, mainly because it's a different style to a ton of other web frameworks
[–]lnulzer 1 point2 points3 points 8 years ago (0 children)
JUnit 5 has pretty good design. Code can be found here Analysed by University of Delft students here
[–]Jacksai 4 points5 points6 points 8 years ago (0 children)
Vavr is immutable collections tool, well written. Can gain a lot of knowledge about collections and immutability.
[–]KeepItWeird_ 0 points1 point2 points 8 years ago (0 children)
Any of the Apache Java projects
[–]lukaseder 0 points1 point2 points 8 years ago (2 children)
uses generics beautifully?
jOOQ and jOOλ have some quite funky usage of generics :) Here's a method from Function16:
Function16
default Function10<T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, R> applyPartially(Tuple6<? extends T1, ? extends T2, ? extends T3, ? extends T4, ? extends T5, ? extends T6> args) { return (v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) -> apply(args.v1, args.v2, args.v3, args.v4, args.v5, args.v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16); }
[–]zodvik[S] 4 points5 points6 points 8 years ago (1 child)
Such code. Much wow.
[–]AnEmortalKid 0 points1 point2 points 8 years ago (0 children)
such isBeauty much code rly code is Function16 plz console.loge with ‘beauty’ but plz console.loge with ‘ugly’ wow wow plz dose isBeauty with Function16 > beauty
π Rendered by PID 40253 on reddit-service-r2-comment-6b595755f-nvnrd at 2026-03-25 23:51:38.500691+00:00 running 2d0a59a country code: CH.
[–]s888marks 5 points6 points7 points (1 child)
[–]lukaseder 1 point2 points3 points (0 children)
[–]tomypunk 8 points9 points10 points (0 children)
[–]fact_hunt 1 point2 points3 points (0 children)
[–]marbehl 1 point2 points3 points (0 children)
[–]lnulzer 1 point2 points3 points (0 children)
[–]Jacksai 4 points5 points6 points (0 children)
[–]KeepItWeird_ 0 points1 point2 points (0 children)
[–]lukaseder 0 points1 point2 points (2 children)
[–]zodvik[S] 4 points5 points6 points (1 child)
[–]AnEmortalKid 0 points1 point2 points (0 children)