how often does the letter d occur in:
q: disable overriding in apex as a follow up to this question i posted yesterday, i have a generic batch job class as so:
public abstract class genericjob implements database.batchable<sobject>, database.stateful {
    string query;
    
    public void setquery(string query) {
        this.query = query;
    }
    
    public string getquery()
    {
        return query;
    }
    
    public database.querylocator start(database.batchablecontext context) {
        return database.getquerylocator(query);
    }
    
    public abstract void execute(database.batchablecontext context, list<sobject> scope);
    
    public void finish(database.batchablecontext context) {
        ... // my own finish logic here
        dofinish(context);
    }
    
     public abstract void dofinish(database.batchablecontext context); // user defined execute logic
}

as you can see, i have the finish function where i want to carry out some work of my own, and then give the user the option to perform their own finish logic after im done with mine. i would like to allow the user to override the dofinish function, but how do i prevent them from overriding the finish (or any of the other functions for that matter)? it seems that overriding any method is just a step away with the override keyword. i cant make the functions private as they are overriding the same function declarations of the database.batchable interface.
do i just hope and pray that my client will have the good sense to know what to leave alone? or is there a way i can actually prevent them from overriding that method unknowingly?
i havent found a solution to this anywhere. any help would be appreciated. thank you!

a: you can only override functions defined as virtual or abstract. the way your class is written, the finish method cannot be overridden, despite the class being an abstract class.

a: okay, so the reason i posted this question in the first place is that, when i tried overriding it, the developer console did not throw an error at first. so i believed that this was actually a problem. 
when i refreshed the console and tried recompilation, the console then threw the following error:
job1: non-virtual, non-abstract methods cannot be overriden: void finish(database.batchablecontext)

conclusion: if a method in an abstract class is non-virtual, it cannot be overridden at all.
hope this helps anyone having this query.

user
The text includes sixty-six "d"s in total.
assistant