Batch Apex Interview Questions
Batch Apex Interview Questions
Batch Apex
Interview
Questions
Sweety Kumari
Notes
Basic Level Interview Questions
Example:
Notes
Iterable:
Iterable allows you to define the
scope of records using an Apex
Iterable, which is a collection of
objects that can be iterated over.
Usage:
Commonly used when you have a
pre-defined collection of records or
when you need to process a
complex data set that is not easily
retrieved by a single SOQL query.
Notes
Features:
1. Custom Collections:
Useful for complex data sets
that require custom logic to
gather records.
Can use any collection type
that implements the Iterable
interface, such as a List.
2. Flexibility:
Allows for more flexibility in
defining the data set.
You can mix different object
types and apply custom
filtering or processing logic.
3. Limited to Heap Size:
Must be mindful of governor
limits, such as heap size,
when using large collections
Notes
Example:
Notes
Bonus Question:
Can we create batch apex with more
than one execute method ?
Answer :
Try it now and you will get your
answer.