In my blog I write about misconceptions. Encapsulation is something you learn when you study Java and OOP. But it seems that most books fail to truly explain the problems you want to solve with it and those you get by using it. Often it’s just a short chapter or even just a small part about the important concepts of OOP. This is leading to misconceptions and poor understanding of OOP.
(Note: I wrote this before the release of Java 10. Expect that some things are somewhat outdated.)
Continue reading Encapsulation
To be able to use a language you need to actually understand it. This may seem obvious, but books on Java usually don’t have much on understanding the language. When you learn French you will want to be able to translate from and to French. Continue reading Understanding Java
This can’t be answered in just a blog entry but I try to give a quick overview.
Continue reading How to do a Project
At some point you will learn about concurrent programming. The Java Memory Model is the essential concept you need to learn. But it’s no easy to grasp as a beginner. I try to explain some of the most important aspects.
Continue reading Java Memory Model
You may wonder if double checked locking (DCL) works in Java. It does and it doesn’t. I explain why. Continue reading Double Checked Locking in Java
So Java has references. But what about pointers and pass-by-reference? References in Java are different to PHP, C# and other languages. And this can cause some confusion. Continue reading What are References in Java?
Here’s some advice to all who have just begun learning Java. This also serves as an overview to my blog, where I write about all kinds of misconceptions and common problems with programming in Java. Continue reading Dos and Don’ts
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.
Continue reading Simple Animation Loop in Java