Built by a working Salesforce developer
Practice the Apex that PD1 and interviews test.
Write real Apex and get every drill checked automatically. Start in your browser, then move to your own free Salesforce Developer org for SOQL, triggers, tests and async Apex.
Create a free account Browse all drills
About 5 minutes to start. No Salesforce org needed for your first drill. 53 free drills across Apex basics and Classes & objects.
- Write real Apex
- Get automatic feedback
- Track your progress
How it works
- Try your first drill. Complete a short Apex exercise in your browser.
- Connect a practice org. Use a free Salesforce Developer org for exercises that run in Salesforce. Production orgs are blocked.
- Practice and track progress. Submit solutions, review automatic results, and work through the topics.
Topics: 131 drills in 9 modules
Start with 53 free drills across Apex basics and Classes & objects. Continue with Apex Path for $19 a month.
- Apex basics (37 drills, beginner, free). Variables, numbers, text, dates, if and switch, loops, Lists, Sets and Maps. Your Apex foundation.
- Classes & objects (16 drills, beginner, free). Classes, constructors, methods, access modifiers, exceptions and enums.
- SOQL queries (20 drills, intermediate). SOQL and SOSL: filters, bind variables, relationships, aggregates, date literals and safe dynamic queries.
- DML operations (13 drills, intermediate). Insert, update, upsert and delete, Database methods, save results, savepoints and bulk-safe DML.
- Unit testing (10 drills, intermediate). Apex test classes that fail when the code is wrong: assertions, test data, mocks and callout mocks.
- Triggers (11 drills, intermediate). Before and after triggers, handler classes, bulk patterns, recursion guards and roll-ups.
- Asynchronous Apex (9 drills, advanced). Future methods, Queueable, Batch and Schedulable Apex.
- Debugging (8 drills, intermediate). Fix real production bugs: queries and DML in loops, null checks, recursion, mixed DML, empty tests and batch state.
- Security & deployment (7 drills, advanced). Governor limits, security and the habits that survive a production deploy.
Turn what you learn into Apex practice.
Use ApexSensei alongside your learning resources to practice writing Apex through focused exercises with automatic checking.
Practice exams plus Apex drills
Studying for Admin, Platform Developer I, or Agentforce Specialist? Work through a Salesforce practice exam, then write the matching Apex on the drills.
Questions people ask
What is ApexSensei?
ApexSensei is a practice site for Salesforce Apex, for people preparing for PD1 or a developer interview. You work through 131 short drills in 9 modules, from your first variable to triggers, tests and async Apex. Most drills run in your own free Salesforce Developer org, so you practice on the real platform.
Is ApexSensei free?
Yes, to start. The Write Apex and Think in classes modules (53 drills) are free to check and run. Every other drill is free to read. Apex Path adds Check and Run on the other 7 modules for $19 a month.
Do I need a Salesforce org?
Not for your first drill. It runs in the browser and takes about 5 minutes. After that, drills run in a free Salesforce Developer org that you connect to ApexSensei. You can sign up for one at developer.salesforce.com.
Can ApexSensei touch my company's production org?
No. ApexSensei blocks production orgs. Connect a Developer org that you use only for practice.
How is ApexSensei different from Trailhead?
Trailhead teaches the platform with modules and quizzes. ApexSensei is where you practice. You write the Apex yourself, run it in your org, and every drill is checked automatically. Many people use both: learn a topic on Trailhead, then drill it here.
How long does a drill take?
Between 5 and 25 minutes. Most take about 15.
Who built ApexSensei?
We built ApexSensei so you can practice Apex in a real Developer org, not just read about it. The drills are written by a Salesforce developer and the author of Learning Apex and Learning LWC.
Start your first Apex drill today.
Practice in your browser in about five minutes. Continue with 53 free drills across 2 introductory modules.