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.
Month: December 2014
Decorator implementing Comparable
Here’s an example to show how to implement compareTo
in a decorator.
Continue reading “Decorator implementing Comparable”
Abstraction vs abstract
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”
Does Java support Multiple Inheritance?
This is probably often asked at interviews. But the question is incomplete.
OOP isn’t about 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.