Apex Classes

Apex, an object-based language, allows you to define classes. Classes contain both states, in the form of variables, and behaviors, in the form of methods.

Voice of the Developer

An Apex class can also define an interface. An interface specifies methods, but does not implement the functionality of the methods with code. Another Apex class can implement the interface, which means that the implementing class provides functionality for all the methods described in the interface.

Defining a Class

To define a Force Platform class, you need to use the following syntax:

access_modifier class class_name {
 //the body of the class
}

The access ...

Get The Developer’s Guide to the Force.com Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.