• Pranav HP 9
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi ,
I have wriiten a code which is to add &sub 2 numbers...When I use data type as int I am able to run the code successfully.However,when I use data type double I am getting an error which says "Method does not exist or incorrect signature: [mathamatics].resultofadd(Decimal, Decimal)".Below is my code:
public with sharing class mathamatics
{
public double resultofadd{get;set;}
public double  resultofsub{get;set;}

public mathamatics(){


}

public double  resultofadd(double  a,double  b)
{
double  z=a+b;

System.debug(z);
return z;
}
public double  resultofsub(double  a,double  b)
{
double  z=a-b;
System.debug(z);
return z;

}
In asynchronous window:
 mathamatics d=new  mathamatics(); 
d.resultofadd(6.12,4.11);
d.resultofsub(6.022,4.122);

Pls help 

 
Hi ,
I have wriiten a code which is to add &sub 2 numbers...When I use data type as int I am able to run the code successfully.However,when I use data type double I am getting an error which says "Method does not exist or incorrect signature: [mathamatics].resultofadd(Decimal, Decimal)".Below is my code:
public with sharing class mathamatics
{
public double resultofadd{get;set;}
public double  resultofsub{get;set;}

public mathamatics(){


}

public double  resultofadd(double  a,double  b)
{
double  z=a+b;

System.debug(z);
return z;
}
public double  resultofsub(double  a,double  b)
{
double  z=a-b;
System.debug(z);
return z;

}
In asynchronous window:
 mathamatics d=new  mathamatics(); 
d.resultofadd(6.12,4.11);
d.resultofsub(6.022,4.122);

Pls help 

 

Hi every one,
    i have requirement for update grand parent field update when update happens in grand child object .how can we achieve this .
The object like A (grand parent) ,B (parent) ,C(grand child)
Please suggest me.