function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DIVAKAR BABU 15DIVAKAR BABU 15 

why i am getting error

public class Abdevil {
    public integer bvalue{get;set;}
    public integer avalue{get;set;}
    public integer result{get;set;}
    public string operation{get;set;}
    public pagereference subb()
    {
        result   = avalue-bvalue;
        operation = 'SUBTRACTION';
        return null;
    }
    public pagereference subb()
    {
        result= avalue+bvalue;
        operation= 'ADDITION';
        return null;
    }
    
    

}


method already decleared ? line 12
Maharajan CMaharajan C
Hi Divakar,

public class Abdevil {
    public integer bvalue{get;set;}
    public integer avalue{get;set;}
    public integer result{get;set;}
    public string operation{get;set;}
    public pagereference subb()
    {
        result   = avalue-bvalue;
        operation = 'SUBTRACTION';
        return null;
    }
    public pagereference Add()    // Don't use the already used method Name in class
    {
        result= avalue+bvalue;
        operation= 'ADDITION';
        return null;
    }
    

}

Can you please Let me know if it helps or not!!!

If it helps don't forget to mark this as a best answer!!!


Thanks,
Raj