Some Mammals can fly. Dog extends Mammal, but it can’t fly. The term “extends” leads to some misconceptions. Continue reading “Misconceptions about the “extends” Keyword”
If you want to show some animation, maybe for a simple java game, then you need to render a certain amount of frames per second. For a smooth animation you want 30 to 60 frames per second. But sometimes the needed calculations need a bit longer so the delay until the drawing of the next frame needs to be shorter. For this an animation loop is needed. I have implemented a very simple animation loop for Java 8+ that can be paused and started.
Java doesn’t provide tuples. Here are some ideas what you can do about it. Continue reading “Tuples in Java”
So in Java there are many kinds of methods. I probably won’t even list half of them but I try to explain how different methods can be. Continue reading “Types of Methods in Java”
There’s a lot of confusion about “functions” in Java. Java doesn’t really have them, but an object could represent a function so it kind of does have them. I try to explain the different meanings of “functions” in Java, other languages and in mathematics.Continue reading “Functions in Java”
Functional Programming made easy!
Continue reading “Functional Programming in Java 8”
Many things are outdated and better alternatives exist.
New is used to create new objects. But it’s used carelessly.Continue reading “Misconceptions about the new Operator”
In Java you can only reference final fields inside a closure. Here’s my solution*.Continue reading “Recursive Closures in Java”
Point 11 of the Joel Test asks: “Do new candidates write code during their interview?”
But how do you do that? I find most tips on the internet aren’t really helpful or realistic.