Apex Interview Questions 2026: Access Modifiers, Future Methods & Sharing

TopicApex
Focus AreaApex Developer
Questions36+
Topics4

Apex interview questions collected from real developer interviews (updated Oct 2026). Covers access modifiers, constructors, sharing behaviour, future methods, annotations and governor limit errors in short, revision friendly groups.

What's Covered

Topics covered in these questions.

01Access Modifiers & Constructors10
02Sharing Behaviour5
03Future Methods11
04Apex Annotations & Errors10

All Interview Questions

Every question listed one by one, in a fresh order. Answers are not included, so practise explaining each one in your own words.

Access Modifiers & Constructors
1Can a class have multiple constructors, and can you call one constructor from another?
2Can we use access modifiers with triggers?
3Can we use the protected access modifier with an Apex class?
4Can constructors be private in Apex?
5What is the order of execution of constructors?
6Can you create an outer class with a private access modifier?
7Can a constructor return a value or be abstract?
8Can we use access modifiers with interfaces, and what is the default?
9What is the default access modifier for an Apex class?
10Can an inner method be global if the outer class is public?
Sharing Behaviour
11Can we use with sharing and without sharing on a trigger?
12If a with sharing class calls a method of a without sharing class, which mode does the invoked method run in?
13How can you make a complex Apex class that runs multiple queries and updates respect FLS for the current user?
14What is the default sharing mode of an Apex class?
15If a without sharing class calls a with sharing class, what happens?
Future Methods
16Can we call a Queueable from a future method?
17What is Mixed DML and how do you solve it? What are setup objects?
18Can a future method be non-static, and why can't it return anything?
19Why can't we pass an sObject to a future method?
20How many future methods can a class have, and what are the limitations?
21How do you test a future method?
22Can we call a batch from a future method, and a future from a future?
23When do you use a future method, and can we make callouts from it?
24Do future methods execute in the order they were called?
25A batch inserts Accounts, a trigger fires and calls a future method. What happens in that transaction?
26What are the performance best practices for future methods?
Apex Annotations & Errors
27What is the heap size in synchronous and asynchronous transactions?
28What are the annotations used in Apex (@future, @IsTest, @TestVisible, @AuraEnabled, @RestResource, @testSetup)?
29A user gets a DML limit exception while inserting a record. What could be the reason?
30How many triggers can we write on an object, and why only one?
31What is the difference between a 15-digit and an 18-digit Id?
32What is the difference between isNull and isBlank?
33What is the difference between a wrapper class and the static keyword, and when do you use each?
34What are the different types of exceptions?
35What do the 101 and 151 errors mean, and how do you resolve them?
36What is a view state error?

Preparing for a Salesforce developer interview?

Browse more real company interview experiences and hands-on Apex trigger patterns.

Leave a Reply