First things first, but not necessarily in that order.
|--Dr. Who, Meglos|
The fundamental programming unit of the Java programming language is the class. Classes provide the structure for objects and the mechanisms to manufacture objects from a class definition. Classes define methods: collections of executable code that are the focus of computation and that manipulate the data stored in objects. Methods provide the behavior of the objects of a class. Although you can compute using only primitive types—integer, floating-point, and so on—almost any interesting program will create and manipulate objects.
Object-oriented programming strictly separates the notion of what is to be done from how it is done. “What” is described ...