I have tried to write a simple skeletal structure of the Batch apex class. I have included all the methods inside the batch apex.

However Im getting the below error message at the fist line of the code.

Class accountbatch must implement the method: System.Iterable Database.Batchable.start(Database.BatchableContext)

Please find the batch class below.

global class accountbatch implements Database.Batchable<Account> {
    global database.QueryLocator Start (Database.BatchableContext bc) {
        String query = 'select id,Name from Account';
        return Database.getQueryLocator(query);
    global void execute (Database.BatchableContext bc,List<Account> scope){

    global void finish (Database.BatchableContext bc){}


1 Answer 1



global class accountbatch implements Database.Batchable<Account>


global class accountbatch implements Database.Batchable<sObject>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.