|
You are here |
qnoid.com | ||
| | | | |
hanno.codes
|
|
| | | | | In the summer of 2021, I got my Java 11 certification. I expected it to be quite a breeze, because I'd been a Java developer for 14 years and surely I should have seen it all by now, right? Turned out I was very wrong. I came across lots of things that I didn't even know were possible with Java. In this weekly blog series I will go through 11 of these 'crazy learnings' that surprised me the most, even as an experienced developer. This week we'll focus on anonymous subclasses in enums. | |
| | | | |
sookocheff.com
|
|
| | | | | One of the core features of modern Java is lambda expressions. Introduced in Java 8, lambdas provide concise syntax allowing the deferred execution of a block of code. Put a different way, lambdas allow us to pass behaviour as a method parameter. When the method executes, the lambda expression is run. This capability is often referred to as behaviour parameterization. Behaviour parameterization can be achieved in a number of ways, of which lambda expressions are usually the most convenient, and they are definitely the most concise. But what is behaviour parameterization, and why would we want to use it? To motivate this discussion, let's work through a real-world example of filtering a list of items according to some criteria. More concretely, let's investig... | |
| | | | |
ryanharter.com
|
|
| | | | | In my last article, I gave a basic introduction to AutoValue, the code generating annotation processor that makes immutable value types in Java easy. Now I'd like to take a bit of a deeper look at AutoValue and how it works. Compile Time Annotation Processing First things first, AutoValue is a compile time annotation processor. This means that it only runs when you compile your code, as opposed to when your app is running. | |
| | | | |
www.janwagemakers.be
|
|
| | | For the smartthermostat I'm working on, I was looking for a way to get the outside temperature without placing a real sensor outside. | ||