How to - Java Interfaces and Abstrac Classes
Today's topic - what is an interface? And what the hell does that have to do with abstract classes? As you can see, we introduce this program not as a class, but an interface. Inside the interface there are methods, which can or can not contain any kind of parameters but the bodies of these methods are empty. But why would you want that .__. Look at the interface as a kind of blueprint. When you are a contractor and you are supposed to build a whole neighbourhood with 14 houses that look the same (kitchen, 2 bedrooms, 3 baths and a porch) you might not want to sit down at your desk 14 times and draw plans for every single house if they are going to look the same fucking way in the end ._. Sure, you might want to paint one green and the other red - but that can be added later on. So our interface is a blueprint for a type of class that should in the future be used over and over again, with the same kinds of methods in them. Note here: once you implement an interface int