Annotations are defined with an initial @ symbol, followed by the appropriate keyword. To add an annotation to a method, specify it immediately before the method or class definition.
Apex supports the following annotations:
Apex REST annotations:
@future annotation in Salesforce:
Use the future annotation to identify methods that are executed asynchronously. When you specify future, the method executes when Salesforce has available resources.
For example, you can use the future annotation when making an asynchronous Web service callout to an external service. Without the annotation, the Web service callout is made from the same thread that is executing the Apex code, and no additional processing can occur until the callout is complete (synchronous processing).
1. Methods with the future annotation must be static methods and can only return a void type.
2. The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types.
3. Methods with the future annotation cannot take sObjects or objects as arguments.