Most tutorials use some recursive Task to calculate a Fibonacci number or something similar. This leads to the false impression that Fork/Join can only handle recursive Tasks (e.g. Divide-And-Conquer). Here’s a very simple example of a non-recursive Task.
Continue reading “Fork/Join with non-recursive Task”
Here’s an example to show how to implement
compareTo in a decorator.
Continue reading “Decorator implementing Comparable”
Abstraction is very important in Java. And there’s the keyword abstract. But the use of abstract is not abstraction. It’s a common misconception that the abstract keyword is used for abstraction.
Continue reading “Abstraction vs abstract”
This is probably often asked at interviews. But the question is incomplete.
Continue reading “Does Java support Multiple Inheritance?”
Any book on OOP must explain inheritance, simply because it’s an important part of OOP in many languages. And since it’s so hard to explain and understand a large part of the book will be just about inheritance. This may lead to the false impression that OOP is just about inheritance.
Continue reading “OOP isn’t about inheritance”