Java Weekly, Issue 529

LINQ emulation in Java, JPA fetch types, stateless sessions in Hibernate, GC improvements, and Actor model concurrency.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Preventing Gson from Expressing Integers as Floats

Learn why integers are considered floating-point numbers and how to prevent Gson from representing integers as floats.        | Continue reading


@feeds.feedblitz.com | 9 months ago

How to Collect All Results and Handle Exceptions With CompletableFuture in a Loop

Learn how to collect the results of multiple CompletableFuture executions while also handling exceptions in Java.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Count Uppercase and Lowercase Letters in a String

Learn how to count the number of uppercase and lowercase letters in a String in Java.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Collect Stream of entrySet() to a LinkedHashMap

Explore various ways to collect a stream of Map.Entry objects into a LinkedHashMap.        | Continue reading


@feeds.feedblitz.com | 9 months ago

REMEDIAL TUESDAY: Comments I Missed!

After a few months of being good—I was making a real effort—I got behind on Comments again in recent weeks. The problem with getting behind is that when I finally do get the Featured Comments up, people don't go back to revisit those posts, and so the comments get lost. I'm not g … | Continue reading


@feeds.feedblitz.com | 9 months ago

Guide to System.in.read()

Learn how to use Java's System.in.read().        | Continue reading


@feeds.feedblitz.com | 9 months ago

Mike's on Vacation (Blog Note)

Pardon the interruption! Since I haven't been keeping up very well for several days, I'm just going to do like I've done eight or ten times before when one of these FONKU* kernal panics happens, and give in and make it a vacation. I'm feeling fine, in fact never better, but all t … | Continue reading


@feeds.feedblitz.com | 9 months ago

Find the First Non-repeating Element of a List

Learn a few approaches to finding the first non-repeating element in a list, each with its advantages and considerations.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Moves Zeros to the End of an Array in Java

Learn how to rearrange the zero value elements of a Java array, moving them to the end.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Two Interesting Keyboard Videos (OT)

No post today. (Well, except this one, and it doesn't count.) It's Super Bowl Sunday in the USA. I am waist deep in keyboard shopping anyway. You think shopping for photo gear is hard? It's dead simple and straightforward compared to keyboard-land. Good Lard, as the Irish say. I … | Continue reading


@feeds.feedblitz.com | 9 months ago

“I’ve never seen you paint”

… said the collector to the painter Jasper Johns. “Neither have I.” Watching is different than doing. Trying to do both at the same time is a challenge.       | Continue reading


@feeds.feedblitz.com | 9 months ago

How to Check if a Variable Is Defined in Thymeleaf

In this article, we learn how to check if a variable is defined in a Thymeleaf template.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Convert Infix to Postfix Expressions in Java

Explore infix, prefix, and postfix notations of mathematical expressions.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Get All Results at Once in a Spring Boot Paged Query Method

Revisit how to retrieve data in pagination using Spring Boot how to retrieve all results at once using pagination        | Continue reading


@feeds.feedblitz.com | 9 months ago

Mutable vs. Immutable Objects in Java

Learn more about the definitions, examples, advantages, and considerations of mutable and immutable objects in Java.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Correlations between spouses

Correlations between spouses Extraversion: r= .005Neuroticism: .082Height: .227Weight: .154Education: .5Political party: .6 "Mates tend to be positively but weakly concordant on personality and physical traits, but concordance of political attitudes is extremely high" pic.twitter … | Continue reading


@feeds.feedblitz.com | 9 months ago

Saturday assorted links

1. Liverpool man who inherited £100,000 lets 12 strangers give the money away. 2. Jonathan Eaton, RIP.  And more on his work in trade economics. 3. ACX grants from Astral Codex.  And new African School of Economics coming in Zanzibar. 4. The Monk and the Gun is a fun Bhutanese mo … | Continue reading


@feeds.feedblitz.com | 9 months ago

Transitions are difficult

They’re risky (unknown territory leads to unforeseen outcomes) and a very recent phenomenon. A kid dropped off at pre-school, a new boss, a food you’re not familiar with. None of this was common for most of pre-history. When the transition occurs, we’re tempted to direct our anxi … | Continue reading


@feeds.feedblitz.com | 9 months ago

Introduction to OpenGrok

In this article, we learn how to get started with OpenGrok, an open-source code search and cross-reference engine.        | Continue reading


@feeds.feedblitz.com | 9 months ago

A Guide to the @SoftDelete Annotation in Hibernate

Learn about the Hibernate @SoftDelete annotation and understand how to implement it.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Run Maven From Java Code

Learn how to interact with Maven and run builds directly from the code.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Understanding “Raw type. References to generic types should be parameterized” Error

Learn about the Eclipse IDE process of issuing a "Raw type" popup to draw attention to the incorrect use of parameterized classes.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Aptitude (Old-Dog-New-Trick Update)

Briefly: I've been practicing touch-typing for the past two days. I am rediscovering that I am amazingly clumsy. I actually was tested for aptitudes when I was 16, and one of the things I scored lowest in was "manual dexterity." I had been a model-builder before that (1920s and ' … | Continue reading


@feeds.feedblitz.com | 9 months ago

The Secret Darkroom of Walter Mitty

I really want to thank reader Bob Johnston, no relation. His suggestion in a comment the other day was a EUREKA! moment for me. He said of his moribund darkroom, "But I do want to show it to my grandchildren one day." Bright lightbulb went off above my pumpkin head. That is what … | Continue reading


@feeds.feedblitz.com | 9 months ago

Understanding free software

A cup of coffee costs far more than a glass of water. That’s true even though we can’t live without water. (Most) people can live without coffee. It’s true even though creating the infrastructure to purify and deliver clean water costs billions of dollars. The critical reason for … | Continue reading


@feeds.feedblitz.com | 9 months ago

Jump in the lake

The waters of Buck Lake are cool and clear and restorative. All summer, it’s tempting to go for a swim. But it’s also a hassle. You need to change your clothes, find someone to guard, bring a towel and most of all, gasp at the transition when the cold water hits. And yet… no one … | Continue reading


@feeds.feedblitz.com | 9 months ago

Open Mike: My Dumb Young Self (OT)

I have a tiny little first-world problem, but one that I still have yet to solve. And one that I have to solve. I had better solve it. I feel like a veteran photographer whose favorite material has just been discontinued. I could tell you stories about that. (I was going to, but … | Continue reading


@feeds.feedblitz.com | 9 months ago

All customers are the same

[and all customers are different.] Customers are why you’re here. They pay the bills and they are the primary driver of your growth. But each adds a different amount of value to your organization and the journey you’re on. The customer who spends 100x as much as the average custo … | Continue reading


@feeds.feedblitz.com | 9 months ago

Injecting @Mock and @Captor in JUnit 5 Method Parameters

Learn how to inject the @Mock and @Captor annotations in unit test method parameters.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Storing UUID as Base64 String in Java

Learn how to store UUID as Base64 String using different approaches in Java.        | Continue reading


@feeds.feedblitz.com | 9 months ago

What’s the right size?

There are no city buses with just four seats. And none with 400 seats. We get to leverage the driver’s effort if we put in a few more seats, but add too many and the bus is too big to make a turn–and soon we’d have to add conductors and cleaners and then the bus […]       | Continue reading


@feeds.feedblitz.com | 9 months ago

Calculate Weighted Mean in Java

A quick and practical guide to calculating weighted mean in Java.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Instantiate an Inner Class With Reflection in Java

Explore how to instantiate static and non-static inner classes with the Java Reflection API.        | Continue reading


@feeds.feedblitz.com | 9 months ago

CountDownLatch vs. Semaphore

Explore the differences between CountDownLatch and Semaphore and discuss when to use each.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Run-Length Encoding and Decoding in Java

Learn how run-length encoding works and then, explore two approaches to implementing run-length encoding and decoding.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Looking for a Backend Java/Spring Team Lead with Integration Experience (Remote) (Part Time)

Looking for a Java Team Lead with integration experience to join the Baeldung team.     Related StoriesJava Course Team Lead with Spring Experience (Remote) (Part Time)Looking for a Backend Java/Spring Developer with Integration Experience (Remote) (Part Time)Looking for a Java D … | Continue reading


@feeds.feedblitz.com | 9 months ago

Generating Unique Positive Long Using SecureRandom in Java

Learn how to use SecureRandom to generate unique positive values in Java.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Normalize a URL in Java

Explore different techniques to normalize a URL in Java.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Convert String Date to XMLGregorianCalendar in Java

Explore various approaches to converting a String date to an XMLGregorianCalendar instance.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Display Image With Thymeleaf

Learn to serve an image from the resources folder in a Spring Boot application.        | Continue reading


@feeds.feedblitz.com | 9 months ago

Shutting Down on OutOfMemoryError in Java

Learn how the OutOfMemoryError often puts an application in an incorrect state.        | Continue reading


@feeds.feedblitz.com | 9 months ago

What Was the Best Enlarger Ever Made?

Wait, what? What is this, 1989?  Well, Tracy Chapman did just perform "Fast Car" at the Grammys. It's a silly question now, and if you do not care about the answer, well, few do. Keep in mind, though, please, that not every post here is for everyone. A minority of TOP readers sti … | Continue reading


@feeds.feedblitz.com | 9 months ago

As slow as possible

A six-hundred-year-long organ recital is going on, and today marks a change in notes. If you miss it, the next one is in two years. We’re used to the rapid increase in speed in just about everything around us. Absolutely positively overnight is mostly too slow for many industries … | Continue reading


@feeds.feedblitz.com | 9 months ago

Picture of the Leitz Focomat IIc

I looked in vain the other day for a good photograph of the Leitz Focomat IIc that I could use. Reader Guenther Roth found a great one—it's at the top of Austrian photographer Thomas Eisl's review. I didn't find that in my own search. Here's the link, if you want to see what the … | Continue reading


@feeds.feedblitz.com | 9 months ago

Open Mike: Surprising Facts (OT)

["Open Mike" is the often off-topic Editorial Page of TOP. It appears on Sundays, allegedly and theoretically.] Photo by Douwe C. van der Zee —>The first thing made by humans that was taller than the Great Pyramid of Giza was the spire of Lincoln Cathedral in Lincoln, England, co … | Continue reading


@feeds.feedblitz.com | 9 months ago

The pitfall of Big Game thinking

In the US, today is a major holiday. The Superb Owl, with nachos, commercials and beer. People who don’t even watch football watch this game, and it’s one of the largest audiences each year on TV. For a certain kind of mass marketer, a Super Bowl ad has been the gold standard for … | Continue reading


@feeds.feedblitz.com | 9 months ago

Two chicken jokes

“Why did the chicken cross the road” tells us a bit about jokes. It’s a joke about jokes. The first half is a setup, reminding us that an absurd question creates tension, which is then relieved by the punchline. But the second half undoes this by refusing to release the tension. … | Continue reading


@feeds.feedblitz.com | 9 months ago