A class is a blueprint of an object, and you've learned in Chapter 4, Apex Basics that a class contains properties (member variables) and implementations of behavior (the methods in your class). The class also contains a constructor; this is the only method that does not contain a return value (including void) and has the same name as the class. The members of a class (variables or methods) can have different access modifiers and can be defined as static or non-static.
If you are familiar with programming Java, you will see some similarities, but also some differences. Let's look at an overview of the major differences between Java and Apex:
- Inner classes and interfaces can be only declared one level deep in a parent class.
- Static variables and methods can be declared in a parent class, not in an inner class.
- An inner class acts like a static...