Governor Limits · Salesforce Basic

Apex Class, Variables, Constructor & Methods in Salesforce.

If you know Java or Dotnet applications, then you may observe that everything is written as a class. There are different access levels. You can also define class within a class just like inner class and outer class etc.

Salesforce also provides similar syntax that is followed in Java. Syntax can be to defining a class or variables in class or a wrapper class everything is similar to the syntax followed in Java programming.

Let us see a class and things that can be done in a class in Salesforce.

public class A_Class_Name{ 

        // Variables
	public static string a_Variable {get;set;}

        // Constructor
	public A_Class_Name(){
	        // Constructor business logic code
        }

        // Methods 
        public void a_Method_Name(Integer a_Variable1, Ingeter a_Variable2){
	        // Business logic code
        }
}
Continue reading “Apex Class, Variables, Constructor & Methods in Salesforce.”