Simon Willison’s Weblog


Java interfaces explained

5th December 2002

While browsing through Kasia’s Java Archives I came across this gem explaining why interfaces are such a useful feature of Java:

One thing they do quite well is hide the implementation from the calling classes. Why is that good? Well, when you want to change the implementation you don’t have to change the calling classes.. Saves time, saves work, saves QA resources, code is more readable, more versatile and easier to maintain.

I’d seen this explained before but the example Kasia provides finally made it click for me. Kasia also provides a link to Design Techniques, a collection of articles on good Java design. I just wish I’d found these before I started on our (now handed in) Java coursework.

This is Java interfaces explained by Simon Willison, posted on 5th December 2002.

Next: Vampire ecologies

Previous: YAML

Previously hosted at