O'Reilly logo

The Developer’s Guide to the Force.com Platform by Phil Choi, Andrew Fawcett, Glen Martin, Rick Greenwald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required