I'm implementing an apex batch process.
public class BatchName implements Database.Batchable<XYZClass.wrapper>,Database.Stateful{
I have declared an integer variable as public and assigning value to it in execute method.
Public Integer Counter=0;
When I try to access it in finish method, I am getting null value.
While declaration, when i set it to zero, I'm getting zero. I'm unable to get the assigned integer value.
I'm using the database.stateful, as it allows you to maintain state.
Please help me. Am I overlooking anything here?