← All CSA Flashcard Decks

Apex Programming Flashcards

6 cards from real CSA practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 6 Apex Programming flashcards as text
  1. Which Apex collection type automatically prevents duplicate values?

    Answer: Set

    A Set is an unordered collection that does not allow duplicate values.

  2. What does the 'with sharing' keyword enforce in an Apex class?

    Answer: The current user's record-level sharing rules

    'with sharing' enforces the running user's sharing rules so they cannot access records they don't have permission to see.

  3. How many DML statements can be executed in a single Apex transaction?

    Answer: 200

    Salesforce allows up to 150 DML statements per Apex transaction.

  4. Which Apex method is used to convert a List to a Set to remove duplicates?

    Answer: new Set(myList)

    You can pass a List directly into a Set constructor (e.g., new Set(myList)) to eliminate duplicates.

  5. What is the correct syntax to query all Accounts in Apex?

    Answer: [SELECT Id, Name FROM Account]

    Inline SOQL in Apex uses square brackets and requires explicit field names — wildcards are not supported.

  6. In Apex, what keyword marks a method that can be called from a Visualforce page or Lightning component?

    Answer: @AuraEnabled

    @AuraEnabled exposes an Apex method so it can be invoked from Lightning components.

How this page was made: written with AI tools. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy

Sources & references

Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy

  1. help.salesforce.com — Exam information · verified Oct 2026
  2. help.salesforce.com — Test delivery, eligibility, fees · verified Oct 2026