Learn Apex
Bulkification, governor limits, async processing, and large data volume patterns.
Visual guide for Apex
Concept at a glance
Apex triggers and services must bulkify DML and SOQL to stay within governor limits at scale.
- Triggers & Handler pattern
- Bulkification
- Async: Queueable / Batch
- Governor limit design
Apex triggers and services must bulkify DML and SOQL to stay within governor limits at scale.
Difficulty Level
Focus Area (Triggers, Async, etc.)
Showing 44 of 179 Apex questions
What is Apex and when would you use it?
An admin hits Flow limits on complex validation. The lead asks when Apex is the right tool.
What is bulkification in Apex?
A data load updates 200 Accounts and a trigger fails. You explain why bulk-safe code matters.
What are governor limits?
A junior's integration works for one record but fails on batch jobs. You explain governor limits.
What is the difference between a trigger and a class?
A new hire puts all logic inside a trigger file. You explain separation of concerns.
What is SOQL and how is it different from SQL?
You need Accounts in California with open Opportunities. The interviewer asks how you query in Apex.
What is DML in Apex?
After processing Opportunities, you need to create Tasks. You explain DML operations.
What is a test class and why is 75% coverage required?
Deployment fails due to insufficient test coverage. You explain Apex testing basics.
What is the difference between before and after trigger context?
You must set a field before save and send email after save. You choose trigger contexts.
What are future methods and when use them?
A trigger must call an external API but callouts cannot run with pending DML. You mention @future.
What is CRUD and FLS security in Apex?
A class with sharing disabled exposes salary fields to users who should not see them. You explain security checks.
What is an Apex exception and basic error handling?
Users see a generic "Script-thrown exception" on save. You describe handling errors properly.
What debugging tools help Apex developers?
Your trigger works in sandbox but not production data. You list how you would debug as a junior.
Apply Apex enum and constant patterns for maintainability
Status strings scattered as literals cause typos breaking batch filters silently.
Use Test.isRunningTest branching carefully
Code skips callout in test via Test.isRunningTest but production callout failure path never tested.
Implement custom setting and hierarchy for feature flags in Apex
New trigger logic needs gradual rollout by profile before org-wide enable.
Apply defensive null and empty collection handling in Apex
NullPointerException in production when optional lookup field blank on subset of records in batch.
What is the difference between static and instance members in Apex?
A developer uses a static variable to "remember" a value between two user requests and it does not work.
What is the safe navigation operator and when should you use it?
Code throws NullPointerException when an Account has no owner manager.
What are the main Apex collection methods you use daily?
Rapid-fire collection question.
What is the switch statement in Apex and what can it switch on?
A long if-else chain on Status values is hard to read.
What are Apex enums and why use them over strings?
Status strings like "Approved" are scattered across 30 classes with typos.
What is the difference between insert and Database.insert?
One bad record in a list of 200 fails the whole insert.
What string methods and patterns should every Apex developer know?
Rapid-fire string handling.
What are best practices for Apex class and method naming?
Team coding standards discussion.
What is the difference between Trigger.new and Trigger.newMap, and where is each available?
Rapid-fire trigger context question.
What is the difference between @future and Queueable?
A candidate is asked to compare the two.
How do you schedule Apex and manage scheduled jobs?
A cleanup job must run every night at 2am.
How do you test private methods in Apex?
A complex private helper method needs its own tests.
What data types does Apex support?
Basic Apex question.
What is the difference between a List and an array in Apex?
Quick syntax question.
What is anonymous Apex and when do you use it?
You need to fix 50 records quickly.
What does the "with sharing" keyword do?
Basic security question.
What are trigger events in Apex?
Quick trigger question.
What is the purpose of Test.startTest() and Test.stopTest()?
Basic testing question.
How do you convert between Strings, Integers and Dates?
Parse values from a CSV file.
What is the difference between == and equals() in Apex?
Quick comparison question.
What is a wrapper class and when do you use one?
A table needs records plus a "selected" checkbox.
What is the maximum number of records Trigger.new can contain?
Rapid-fire limits question.
What is an interface in Apex? Give an example.
Basic OOP question.
How do you get the current user's details in Apex?
Quick question.
What is a governor limit exception and can you catch it?
Quick limits question.
What does the "final" keyword mean in Apex?
Quick language question.
How do you check if a field value changed in a trigger?
Run logic only when Status changes.
What is the Limits class used for?
Quick question.