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...