Learn Apex
Bulkification, governor limits, async processing, and large data volume patterns.
114 questions in this topic
Difficulty Level
Focus Area (Triggers, Async, etc.)
Showing 16 of 114 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.