You need to sign in to do that
Don't have an account?
Abhinav Sharma 207
Method does not exist or incorrect signature: void mainValue() from the type PassBy
Hi All,
I am trying to run this code:
public class PassBy {
public void mainValue() {
String url = 'www.one.com';
System.debug('Before Value Call : '+ url );
passByValue(url);
System.debug('After Value Call : '+ url );
}
private void passByValue(String NewUrl)(){
NewUrl = 'www.two.com';
System.debug('Inside change'+NewUrl);
}
}
---------------------------------
PassBy p = new PassBy();
p.mainValue();
---------------------------------------------
Getting below error:
Method does not exist or incorrect signature: void mainValue() from the type PassBy
I am trying to run this code:
public class PassBy {
public void mainValue() {
String url = 'www.one.com';
System.debug('Before Value Call : '+ url );
passByValue(url);
System.debug('After Value Call : '+ url );
}
private void passByValue(String NewUrl)(){
NewUrl = 'www.two.com';
System.debug('Inside change'+NewUrl);
}
}
---------------------------------
PassBy p = new PassBy();
p.mainValue();
---------------------------------------------
Getting below error:
Method does not exist or incorrect signature: void mainValue() from the type PassBy
Try Below Code
Made Some Changes There's Extra '()' In Your passByValue Method
Please Mark It As Best Answer If It Helps
Thank You!
Please change below code:- Please mark it as Best Answer if it helps you.
Thanks & Regards
Suraj Tripathi