If frameworks were Lego kits

By

Imagine some Lego. Or alternatively, think of a non-trademark-infringing equivalent plastic brick product, if you’re concerned about that sort of thing.

So you have this box of Lego. It’s that good old general purpose kind, where almost any kind of block can connect to almost any other kind of block. You can build castles or houses or boats or fluorescent yellow difference engines. It takes a bit of forethought, and occasionally you need to change something you already built …

Multiple Inheritance in Java

By

Most Java developers will have heard the phrase “Java does not support multiple inheritance”, or maybe even admitted that they “wish Java supported multiple inheritance”.

A rarely asked counter-question is “Have you tried?”.

I have.

I set myself the task of creating a working implementation of multiple inheritance within Java. The requirements for a solution were:

  • The inheriting class must have access to all of the inherited class methods and data.
  • It must do this without using composition.
  • It can