Rishabh Raj
Rishabh Raj

Reputation: 1

Method does not exist or incorrect signature: void printOutput(String) from the type Demo

I am very new to the Salesforce, I am running my first program and it shows an error Method does not exist or incorrect signature, seems my code is OK

public class Demo
{
    public void printOutput(String s1)     
    {
        System.debug('Display String ' +s1);
    }

}



Demo1 d1 = new Demo1();
d1.printOutput('Hello World');

Upvotes: 0

Views: 3922

Answers (1)

Akshay Patil
Akshay Patil

Reputation: 1

You creating wrong instance of class Demo. try this:

Demo d1 = new Demo();
d1.printOutput('Hello World');

Upvotes: 0

Related Questions