• Abhinav Sharma 207
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
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