This advanced Java newsletter will answer all your questions about Java ;-) We also offer Java courses, code reviews and consulting.| www.javaspecialists.eu
A few years ago, we tried to create a new distinct() function for a Stream. It wasn't pretty. In this newsletter we revisit that adventure using the new Stream Gatherers from Java 24.| The Java(tm) Specialists' Newsletter
This advanced Java newsletter will answer all your questions about Java ;-) We also offer Java courses, code reviews and consulting.| www.javaspecialists.eu
We are all amazed how AI can help us in everyday tasks. It can even write Java code. But| www.javaspecialists.eu
LinkedHashSet implements the SequencedCollection interface, allowing us to addLast(), addFirst() and even reverse the collection. This sometimes causes some surprises.| www.javaspecialists.eu
In this newsletter, we explore how we can visit the entire hierarchy of threads in our virtual machine, including virtual threads. We do this using the composite, visitor and facade design patterns.| www.javaspecialists.eu
The LinkedBlockingQueue and LinkedBlockingDeque behave slightly differently when methods put() and take() are called by a thread that happens to be in the| www.javaspecialists.eu
How many times have we seen programmers call System.gc() to| www.javaspecialists.eu
Classes java.util.Random and java.util.SplittableRandom didn't used to have a common ancestor, making it difficult to write methods that take either. This was finally fixed in Java 17. Let's have a look at some random Java topics together.| www.javaspecialists.eu
A few years ago, the second oldest man in our village Chorafakia wrote a book about the history of our area. Only catch - it was in Cretan Greek. I tried to read it, but couldn't. Google Translate shrugged at the strange Cretan dialect. Then ChatGPT 4.0 came along, and we can interact with it directly from within Java. In this newsletter we have a look at how I was able to translate this masterpiece into four languages: English, German, Dutch and Slovak.| www.javaspecialists.eu
This advanced Java newsletter will answer all your questions about Java ;-) We also offer Java courses, code reviews and consulting.| www.javaspecialists.eu
Virtual threads should not be used for CPU intensive tasks. The recommended approach is to continue using parallel streams for processing large data sets. However, we should be careful when invoking a parallel stream from a virtual thread. In this newsletter we propose a| www.javaspecialists.eu
In this guest article by Kirk Pepperdine, we learn about how P99 latency is affected by garbage collection stop-the-world events.| www.javaspecialists.eu
We can construct our TreeSet with our own Comparator, however, we need to be careful that it conforms to the specification. The Comparator needs to be consistent with equals() and hashCode() of the elements, otherwise we might end up with a TreeSet with non-symmetric equals() behaviour.| www.javaspecialists.eu
Javadoc specifies the details of our methods using special tags such as @param and @return. After Java 5, we did not see new standard Javadoc tags for 13 years. The hope was that annotations would replace the chaos of doclets. But tags have not disappeared. In this newsletter, we examine several new tags to improve our Javadoc experience.| www.javaspecialists.eu
Someone asked me yesterday what the maximum inheritance depth is in Java. I guessed a value of 65535, but for practical purposes, not more than 5. When I asked performance guru Kirk Pepperdine to estimate, he shot back with 63. In this newsletter, we look at the limitations in the JVM and examine some existing classes.| www.javaspecialists.eu