Code Before super() - JEP 447
Java Specialists
by
2w ago
Java 22 preview allows us to write code before the call to super(). There are restrictions. We are not allowed to refer to "this" in any way. We thus cannot set fields before calling the superclass constructor. But what if the superclass constructor calls our methods? In this newsletter we explor ..read more
Visit website
Harnessing the Power of ChatGPT 4.0 From Java
Java Specialists
by
2M ago
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 dir ..read more
Visit website
Selling Our Java Skills
Java Specialists
by
4M ago
What causes opportunities to disappear? Is it #1 the market has lost interest in what we are selling (Java is dead). Or is it #2 we have personally become irrelevant (AI writes better code)? Or could it be something else? Join me as we read about my recent dumb mistakes ..read more
Visit website
Alternate String Formatting with #
Java Specialists
by
6M ago
The printf() method in Java borrows heavily from C, including the alternate flag #. But %s works a bit differently in Java. In this newsletter we explore this a bit more deeply ..read more
Visit website
Virtual Threads and Parallel Streams
Java Specialists
by
7M ago
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 "safety valve" that can p ..read more
Visit website
Garbage Collection and P99 Latency
Java Specialists
by
10M ago
In this guest article by Kirk Pepperdine, we learn about how P99 latency is affected by garbage collection stop-the-world events ..read more
Visit website
Formatting Inlined @value in Javadocs
Java Specialists
by
1y ago
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 ..read more
Visit website
AccessFlag Set for Modifiers
Java Specialists
by
1y ago
Reflection returns the modifiers of class elements as an unqualified int bitset. Unfortunately some of the bits have a different meaning depending on their context. For example, a method can have their transient bit set, even though that does not make sense for a method. In Java 20, we now have a ..read more
Visit website
Measuring compact strings memory savings
Java Specialists
by
1y ago
JEP 254 replaced the char[] in our Strings with byte[]. How much memory does this save in our Strings? In this newsletter we show how we can determine this from a heap dump file ..read more
Visit website
Contributing BigInteger.parallelMultiply() to O...
Java Specialists
by
1y ago
BigInteger has clever algorithms for multiplying large numbers. Unfortunately multiply() is single-threaded. Until now. In this newsletter I describe how the new parallelMultiply() method works and also how we can all contribute to the OpenJDK ..read more
Visit website

Follow Java Specialists on FeedSpot

Continue with Google
Continue with Apple
OR