Interfaces
Interfaces are reference types in Java. As such, they define the skeleton of classes and objects but without including the actual functionality of methods. Classes implement interfaces but do not extend them. Let's look at an example of a simple interface, further developing the idea of building classes to represent different types of computers.
interface Computer { public String getDeviceType(); public String getSpeed(); } class Tablet implements Computer { public String getDeviceType() { return "it is a tablet"; } public String getSpeed() { return "1GHz"; } } class Example15 { public static void main(String[] args) { Tablet...