Instead of shuffling our stream at the end in the collect() method, we can also shuffle it in stages using the new stream gatherers. This allows us to shuffle sections at a time and even support infinite streams.| www.javaspecialists.eu
ReentrantReadWriteLock has a limit of 65536 concurrent read locks. That is an unattainable number with platform threads, but definitely achievable with virtual threads. In this newsletter we explore some of the issues if we want to switch to the StampedLock.asReadWriteLock() instead.| www.javaspecialists.eu
En esta página vas a encontrar toooodo lo relacionado con la legalidad, políticas y condiciones del blog mi Posicionamiento Web y su dueño, Rubén Alonso (un| mi Posicionamiento Web
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
We are committed to protecting your personal information and your right to privacy. If you have any questions or concerns please contact us.| TheeDigital
Portuguese Version of the Disqus Privacy Policy| help.disqus.com
Italian Version of the Disqus Privacy Policy| help.disqus.com
French Version of the Disqus Privacy Policy| help.disqus.com
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