Order of execution in Salesforce Visualforce Page

1. Constructor of the controller. 2. Action method of the page. 3. Getter methods. 4. If there are any client-side technologies on the page, such as JavaScript, the browser executes them. Example is window.onLoad(). Sample Code: Visualforce page: Apex Controller: Output: